public class MessagingException
extends org.mule.runtime.api.exception.MuleException
MessagingException is a general message exception thrown when errors specific to Message processing occur..| Modifier and Type | Field and Description |
|---|---|
protected Event |
event
The MuleEvent being processed when the error occurred
|
protected org.mule.runtime.api.message.Message |
muleMessage
The Message being processed when the error occurred
|
static String |
PAYLOAD_INFO_KEY |
static String |
PAYLOAD_TYPE_INFO_KEY |
protected Event |
processedEvent |
| Constructor and Description |
|---|
MessagingException(Event event,
MessagingException original) |
MessagingException(Event event,
Throwable cause) |
MessagingException(Event event,
Throwable cause,
Processor failingMessageProcessor) |
MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
Event event) |
MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
Event event,
Processor failingMessageProcessor) |
MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
Event event,
Throwable cause) |
MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
Event event,
Throwable cause,
Processor failingMessageProcessor) |
MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
org.mule.runtime.api.message.Message muleMessage,
MuleContext context)
Deprecated.
use MessagingException(Message, MuleEvent)
|
MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
org.mule.runtime.api.message.Message muleMessage,
MuleContext context,
Throwable cause)
Deprecated.
use MessagingException(Message, MuleEvent, Throwable)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
causedBy(Class e)
Evaluates if the exception was caused (instance of) by the provided exception type
|
boolean |
causedExactlyBy(Class e)
Evaluates if the exception was caused by the type and only the type provided exception type i,e: if cause exception is
NullPointerException will only return true if provided exception type is NullPointerException
|
boolean |
causedRollback()
Signals if the exception cause rollback of any current transaction if any or if the message source should rollback incoming
message
|
boolean |
causeMatches(String regex)
Checks the cause exception type name matches the provided regex.
|
protected void |
extractMuleMessage(Event event) |
protected String |
generateMessage(org.mule.runtime.api.i18n.I18nMessage message,
MuleContext muleContext) |
Event |
getEvent() |
Processor |
getFailingMessageProcessor() |
org.mule.runtime.api.message.Message |
getMuleMessage()
Deprecated.
use
#getEvent().getMessage() instead |
Throwable |
getRootCause() |
boolean |
handled()
Signals if exception has been handled or not
|
boolean |
inErrorHandler()
Signals if the exception occurred in an error handler
|
void |
setCauseRollback(boolean causeRollback)
Marks exception as rollback cause.
|
void |
setHandled(boolean handled)
Marks an exception as handled so it won't be re-throwed
|
void |
setInErrorHandler(boolean inErrorHandler)
Marks the exception so that onTerminate is called on the source instead of onError if not handled
|
void |
setProcessedEvent(Event processedEvent)
Sets the event that should be processed once this exception is caught
|
addInfo, appendMessage, appendSummaryMessage, equals, getDetailedMessage, getExceptionCode, getI18nMessage, getInfo, getMessage, getMessageCode, getSummaryMessage, getVerboseMessage, hashCode, initialise, isVerboseExceptions, prependMessage, setExceptionCode, setMessage, setMessageaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic static final String PAYLOAD_INFO_KEY
public static final String PAYLOAD_TYPE_INFO_KEY
protected transient org.mule.runtime.api.message.Message muleMessage
protected final transient Event event
protected transient Event processedEvent
@Deprecated public MessagingException(org.mule.runtime.api.i18n.I18nMessage message, org.mule.runtime.api.message.Message muleMessage, MuleContext context)
public MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
Event event)
public MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
Event event,
Processor failingMessageProcessor)
@Deprecated public MessagingException(org.mule.runtime.api.i18n.I18nMessage message, org.mule.runtime.api.message.Message muleMessage, MuleContext context, Throwable cause)
public MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
Event event,
Throwable cause)
public MessagingException(org.mule.runtime.api.i18n.I18nMessage message,
Event event,
Throwable cause,
Processor failingMessageProcessor)
public MessagingException(Event event, MessagingException original)
protected String generateMessage(org.mule.runtime.api.i18n.I18nMessage message, MuleContext muleContext)
@Deprecated public org.mule.runtime.api.message.Message getMuleMessage()
#getEvent().getMessage() insteadpublic Event getEvent()
public void setProcessedEvent(Event processedEvent)
processedEvent - event bounded to the exceptionpublic boolean causedBy(Class e)
e - exception type to check againstpublic boolean causedExactlyBy(Class e)
e - exception type to check againstpublic Throwable getRootCause()
public boolean causeMatches(String regex)
regex - regular expression to match against the exception type namepublic boolean causedRollback()
public void setCauseRollback(boolean causeRollback)
causeRollback - public void setHandled(boolean handled)
handled - true if the exception must be mark as handled, false otherwisepublic boolean handled()
public void setInErrorHandler(boolean inErrorHandler)
inErrorHandler - true if the exception has occurred in an error handler, false otherwisepublic boolean inErrorHandler()
public Processor getFailingMessageProcessor()
protected void extractMuleMessage(Event event)
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.