org.identityconnectors.framework.impl.api.remote

Class RemoteWrappedException

    • Method Detail

      • getExceptionClass

        public String getExceptionClass()
        Gets the class name of the original exception. This value is constructed by throwable.getClass().getName().
        Returns:
        name of the original exception.
      • is

        public boolean is(Class<? extends Throwable> expected)
        Checks if the exception is the expected class.
        Parameters:
        expected - the expected throwable class.
        Returns:
        true if the class name are equals.
      • getCause

        public RemoteWrappedException getCause()
        Returns the cause of original throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused the original throwable to get thrown.)
        Overrides:
        getCause in class Throwable
        Returns:
        the cause of this throwable or null if the cause is nonexistent or unknown.
      • readStackTrace

        public String readStackTrace()
      • getStackTrace

        public static String getStackTrace(Throwable throwable)
        Gets the stack trace from a Throwable as a String.
        Parameters:
        throwable - the Throwable to be examined
        Returns:
        the stack trace as generated by the exception's printStackTrace(PrintWriter) method
      • wrap

        public static RemoteWrappedException wrap(Throwable ex)
        Wraps the Throwable into a RemoteWrappedException instance.
        Parameters:
        ex - Exception to wrap or cast and return.
        Returns:
        a RemoteWrappedException that either is the specified exception or contains the specified exception.
      • convert

        public static HashMap<String,Object> convert(Throwable throwable)
        Converts the throwable object to a new Map object that representing itself.
        Parameters:
        throwable - the Throwable to be converted
        Returns:
        the Map representing the throwable.

Copyright © 2019. All rights reserved.