|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
flex.messaging.LocalizedException
flex.messaging.MessageException
public class MessageException
The MessageException class is the basic exception type used throughout the server. This class is extended to support more specific exception types.
| Field Summary | |
|---|---|
static String |
CODE_SERVER_RESOURCE_UNAVAILABLE
|
| Constructor Summary | |
|---|---|
MessageException()
Default constructor. |
|
MessageException(ResourceLoader loader)
Construct a message specifying a ResourceLoader to be used to load localized strings. |
|
MessageException(String message)
Constructor with a message. |
|
MessageException(String message,
Throwable t)
Constructs a new exception with the specified message and the Throwable as the root cause. |
|
MessageException(Throwable t)
Constructs a new exception with the specified Throwable as the root cause. |
|
| Method Summary | |
|---|---|
ErrorMessage |
createErrorMessage()
Creates an error message from the exception. |
String |
getCode()
Returns the code of the exception. |
String |
getDefaultLogMessageIntro()
Returns the default initial text for use in the log output generated by logAtHingePoint(). |
ErrorMessage |
getErrorMessage()
Returns the error message of the exception. |
Map |
getExtendedData()
Returns the extended data of the exception. |
short |
getPreferredLogLevel()
Returns the preferred log level for this exception instance. |
boolean |
isLogged()
Indicates whether this exception has already been logged by a call to logAtHingPoint(). |
boolean |
isLogStackTraceEnabled()
Indicates whether logging of this exception should include a full stack trace or not. |
void |
logAtHingePoint(Message inboundMessage,
ErrorMessage outboundMessage,
String logMessageIntro)
Invoked at hinge-points in server processing where catch-all exception logging is performed. |
void |
setCode(String code)
Sets the code of the exception. |
void |
setErrorMessage(ErrorMessage errorMessage)
Sets the error message of the exception. |
void |
setExtendedData(Map extendedData)
Sets the extended data of the exception. |
void |
setLogged(boolean value)
Records whether this exception has been logged. |
| Methods inherited from class flex.messaging.LocalizedException |
|---|
getDetails, getMessage, getNumber, getRootCause, setDetails, setDetails, setDetails, setDetails, setDetails, setDetails, setMessage, setMessage, setMessage, setMessage, setMessage, setMessage, setMessage, setMessage, setNumber, setRootCause, toString |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String CODE_SERVER_RESOURCE_UNAVAILABLE
| Constructor Detail |
|---|
public MessageException()
public MessageException(ResourceLoader loader)
loader - public MessageException(String message)
message - The detailed message for the exception.
public MessageException(String message,
Throwable t)
Throwable as the root cause.
message - The detailed message for the exception.t - The root cause of the exception.public MessageException(Throwable t)
Throwable as the root cause.
t - The root cause of the exception.| Method Detail |
|---|
public String getCode()
public void setCode(String code)
code - Code of the exception.public String getDefaultLogMessageIntro()
logAtHingePoint().
public Map getExtendedData()
public void setExtendedData(Map extendedData)
extendedData - The extended data of the exception.public ErrorMessage getErrorMessage()
public void setErrorMessage(ErrorMessage errorMessage)
errorMessage - The error message of the exception.public boolean isLogStackTraceEnabled()
MessageException.logAtHingePoint(Message, ErrorMessage, String)public boolean isLogged()
logAtHingPoint().
Manual logging for an exception can use setLogged(true)
to suppress any further automatic logging of the exception.
public void setLogged(boolean value)
value - true if the exception has been logged; otherwise false.public short getPreferredLogLevel()
LogEvent.ERROR.
MessageException.logAtHingePoint(Message, ErrorMessage, String)public ErrorMessage createErrorMessage()
public void logAtHingePoint(Message inboundMessage,
ErrorMessage outboundMessage,
String logMessageIntro)
isLogged() and setLogged() to avoid repeat logging
of the same exception and uses getPreferredLogLevel() which may be
overridden in subclasses to control the log level that the logging is output at.
The underlying exception stack traces are also conditionally included in log output
if the exception class allows it and this is determined by invoking isLogStackTraceEnabled()
inboundMessage - The inbound message that triggered an exception during processing.outboundMessage - The outbound ErrorMessage, which may be null depending on whether it has been generated
or not at the point this method is invoked.logMessageIntro - The beginning text for the log message, which may be null; default value is returned by getDefaultLogMessageIntro().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/MessageException.html