public class ErrorTypeLocator extends Object
ErrorTypeLocator you must use the Builder. An instance of the builder can be created using the
static method #builder.| Modifier and Type | Class and Description |
|---|---|
static class |
ErrorTypeLocator.Builder
Builder for
ErrorTypeLocator |
| Modifier and Type | Method and Description |
|---|---|
void |
addComponentExceptionMapper(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier,
ExceptionMapper exceptionMapper)
Adds an
ExceptionMapper for a particular component identified by a ComponentIdentifier. |
static ErrorTypeLocator.Builder |
builder(ErrorTypeRepository errorTypeRepository)
Builder for creating instances of
ErrorTypeLocator. |
org.mule.runtime.api.message.ErrorType |
lookupComponentErrorType(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier,
Class<? extends Throwable> exception)
Finds the
ErrorType related to a component defined by the ComponentIdentifier based on the exception thrown
by the component and the mappings configured in the ErrorTypeLocator. |
org.mule.runtime.api.message.ErrorType |
lookupComponentErrorType(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier,
Throwable exception)
Finds the
ErrorType related to a component defined by the ComponentIdentifier based on the exception thrown
by the component and the mappings configured in the ErrorTypeLocator. |
org.mule.runtime.api.message.ErrorType |
lookupErrorType(Class<? extends Throwable> type)
Finds the
ErrorType related to the provided exception based on the general mapping rules of the runtime. |
org.mule.runtime.api.message.ErrorType |
lookupErrorType(Throwable exception)
Finds the
ErrorType related to the provided exception based on the general mapping rules of the runtime. |
public org.mule.runtime.api.message.ErrorType lookupErrorType(Throwable exception)
ErrorType related to the provided exception based on the general mapping rules of the runtime.exception - the exception related to the error typepublic org.mule.runtime.api.message.ErrorType lookupErrorType(Class<? extends Throwable> type)
ErrorType related to the provided exception based on the general mapping rules of the runtime.type - the exception Class related to the error typepublic org.mule.runtime.api.message.ErrorType lookupComponentErrorType(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier,
Class<? extends Throwable> exception)
ErrorType related to a component defined by the ComponentIdentifier based on the exception thrown
by the component and the mappings configured in the ErrorTypeLocator.
If no mapping is available then the lookupErrorType(Throwable) rules applies.componentIdentifier - the identifier of the component that throw the exception.exception - the exception thrown by the component.public org.mule.runtime.api.message.ErrorType lookupComponentErrorType(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier,
Throwable exception)
ErrorType related to a component defined by the ComponentIdentifier based on the exception thrown
by the component and the mappings configured in the ErrorTypeLocator.
If no mapping is available then the lookupErrorType(Throwable) rules applies.componentIdentifier - the identifier of the component that throw the exception.exception - the exception thrown by the component.public void addComponentExceptionMapper(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier,
ExceptionMapper exceptionMapper)
ExceptionMapper for a particular component identified by a ComponentIdentifier.componentIdentifier - identifier of a component.exceptionMapper - exception mapper for the component.public static ErrorTypeLocator.Builder builder(ErrorTypeRepository errorTypeRepository)
ErrorTypeLocator.errorTypeRepository - repository of error types.ErrorTypeLocatorCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.