java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.mule.runtime.api.exception.MuleRuntimeException
org.mule.sdk.api.exception.ModuleException
- All Implemented Interfaces:
Serializable
@MinMuleVersion("4.5.0")
public class ModuleException
extends org.mule.runtime.api.exception.MuleRuntimeException
RuntimeException implementation to throw Exceptions that indicates explicitly the ErrorTypeDefinition
that is wanted to throw. Also gives the possibility to declare to add a message and detailed message for the Error to
built.- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModuleException(String message, ErrorTypeDefinition<T> errorTypeDefinition) ModuleException(String message, ErrorTypeDefinition<T> errorTypeDefinition, Throwable cause) ModuleException(org.mule.runtime.api.i18n.I18nMessage message, ErrorTypeDefinition<T> errorTypeDefinition) ModuleException(org.mule.runtime.api.i18n.I18nMessage message, ErrorTypeDefinition<T> errorTypeDefinition, Throwable cause) ModuleException(ErrorTypeDefinition<T> errorTypeDefinition, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ModuleException
- Type Parameters:
T- Type of theErrorTypeDefinition- Parameters:
errorTypeDefinition- The matchedErrorTypeDefinition,cause- TheThrowable.getCause()of this new throwable.
-
ModuleException
public ModuleException(org.mule.runtime.api.i18n.I18nMessage message, ErrorTypeDefinition<T> errorTypeDefinition, Throwable cause) - Type Parameters:
T- Type of theErrorTypeDefinition- Parameters:
message- to override the one from the original throwableerrorTypeDefinition- The matchedErrorTypeDefinition,cause- TheThrowable.getCause()of this new throwable.
-
ModuleException
- Type Parameters:
T- Type of theErrorTypeDefinition- Parameters:
message- to override the one from the original throwableerrorTypeDefinition- The matchedErrorTypeDefinition,cause- TheThrowable.getCause()of this new throwable.
-
ModuleException
public ModuleException(org.mule.runtime.api.i18n.I18nMessage message, ErrorTypeDefinition<T> errorTypeDefinition) - Type Parameters:
T- Type of theErrorTypeDefinition- Parameters:
message- to override the one from the original exceptionerrorTypeDefinition- The matchedErrorTypeDefinition,
-
ModuleException
- Parameters:
message- to override the one from the original exceptionerrorTypeDefinition- The matchedErrorTypeDefinition,
-
-
Method Details
-
getType
- Returns:
- The
ErrorTypeDefinitionof the thrown exception
-
toString
-