public class ExceptionMapper extends Object
ErrorType that must be used when an Exception is thrown by a mule component.
To create instances of ExceptionMapper you must use the builder() method.| Modifier and Type | Class and Description |
|---|---|
static class |
ExceptionMapper.Builder
Builder to create instances of
ExceptionMapper |
| Modifier and Type | Method and Description |
|---|---|
static ExceptionMapper.Builder |
builder() |
Optional<org.mule.runtime.api.message.ErrorType> |
resolveErrorType(Class<? extends Throwable> exceptionType)
Using the set of
ExceptionMappings which this instance was configured with, it resolves the ErrorType
associated with the exception. |
public Optional<org.mule.runtime.api.message.ErrorType> resolveErrorType(Class<? extends Throwable> exceptionType)
ExceptionMappings which this instance was configured with, it resolves the ErrorType
associated with the exception.
Resolution is done based on the different mappings taking into account most specific error types first and then the more
general ones.
If no error type can be find then Optional.empty() will be returned.exceptionType - the exception used to resolve the error type.public static ExceptionMapper.Builder builder()
ExceptionMapperCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.