public class ExceptionHelper extends Object
ExceptionHelper provides a number of helper functions that can be useful for dealing with Mule exceptions. This
class has 3 core functions -
1. ErrorCode lookup. A corresponding Mule error code can be found using for a given Mule exception 2. Additional Error
information such as Java doc url for a given exception can be resolved using this class 3. Error code mappings can be looked up
by providing the the protocol to map to and the Mule exception.| Modifier and Type | Field and Description |
|---|---|
static String[] |
DEFAULT_STACKTRACE_FILTER |
static boolean |
fullStackTraces
When false (default), some internal Mule entries are removed from exception stacktraces for readability.
|
static String[] |
stackTraceFilter
A comma-separated list of internal packages/classes which are removed from sanitized stacktraces.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ExceptionHelper()
Do not instanciate.
|
| Modifier and Type | Method and Description |
|---|---|
static Map |
getExceptionInfo(Throwable t) |
static ExceptionReader |
getExceptionReader(Throwable t)
Gets an exception reader for the exception
|
static List<Throwable> |
getExceptionsAsList(Throwable t) |
static String |
getExceptionStack(Throwable t) |
static Throwable |
getNonMuleException(Throwable t) |
static Throwable |
getRootException(Throwable t) |
static MuleException |
getRootMuleException(Throwable t) |
static void |
registerExceptionReader(ExceptionReader reader)
Registers an exception reader with Mule
|
static Throwable |
sanitize(Throwable t)
Removes some internal Mule entries from the stacktrace.
|
static Throwable |
summarise(Throwable t,
int depth)
Removes some internal Mule entries from the stacktrace.
|
static <T extends Throwable> |
unwrap(T t) |
public static final String[] DEFAULT_STACKTRACE_FILTER
public static String[] stackTraceFilter
fullStackTracespublic static boolean fullStackTraces
stackTraceFilterpublic static <T extends Throwable> T unwrap(T t)
public static ExceptionReader getExceptionReader(Throwable t)
t - the exception to get a reader forpublic static MuleException getRootMuleException(Throwable t)
public static Throwable sanitize(Throwable t)
public static Throwable summarise(Throwable t, int depth)
public static void registerExceptionReader(ExceptionReader reader)
reader - the reader to register.Copyright © 2017 MuleSoft, Inc.. All rights reserved.