public final class ExceptionHelper
extends org.mule.runtime.api.exception.ExceptionHelper
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 | Class and Description |
|---|---|
static interface |
ExceptionHelper.ExceptionEvaluator<T> |
| Modifier and Type | Field and Description |
|---|---|
static String |
RESOURCE_ROOT |
| Modifier and Type | Method and Description |
|---|---|
static String |
getDocUrl(Class<?> exception)
Deprecated.
since 3.8.0
|
static int |
getErrorCode(Class exception) |
static String |
getErrorCodePropertyName(String protocol,
MuleContext muleContext) |
static String |
getErrorMapping(String protocol,
Class exception,
MuleContext muleContext)
Maps an exception thrown for a certain protocol to an error.
|
static String |
getJavaDocUrl(Class<?> exception)
Deprecated.
since 3.8.0
|
static Throwable |
getRootParentException(Throwable t) |
static String |
getTransportErrorMapping(String protocol,
Class exception,
MuleContext muleContext)
Maps an exception thrown for a certain protocol to an error.
|
static Throwable |
sanitizeIfNeeded(Throwable t) |
static <T> T |
traverseCauseHierarchy(Throwable e,
ExceptionHelper.ExceptionEvaluator<T> evaluator) |
static String |
writeException(Throwable t) |
public static final String RESOURCE_ROOT
public static int getErrorCode(Class exception)
public static String getErrorCodePropertyName(String protocol, MuleContext muleContext)
public static String getErrorMapping(String protocol, Class exception, MuleContext muleContext)
protocol - scheme for the transportexception - exception mapped to errormuleContext - the application contextpublic static String getTransportErrorMapping(String protocol, Class exception, MuleContext muleContext)
protocol - scheme for the transportexception - exception mapped to errormuleContext - the application context@Deprecated public static String getJavaDocUrl(Class<?> exception)
@Deprecated public static String getDocUrl(Class<?> exception)
public static <T> T traverseCauseHierarchy(Throwable e, ExceptionHelper.ExceptionEvaluator<T> evaluator)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.