public abstract class MOAException extends Exception
getClause()
method) but will not be used
because of required compatibility with JDK1.3.Constructor and Description |
---|
MOAException(String messageId,
Object[] parameters)
Create a
MOAException . |
MOAException(String messageId,
Object[] parameters,
Throwable wrapped)
Create a
MOAException . |
Modifier and Type | Method and Description |
---|---|
String |
getMessageId()
Returns the message ID of this exception.
|
Throwable |
getWrapped()
Returns the exception wrapped by this
MOAException . |
void |
printStackTrace()
Print a stack trace of this exception to
System.err . |
void |
printStackTrace(PrintStream s)
Print a stack trace of this exception, including the wrapped exception.
|
void |
printStackTrace(PrintWriter s)
Print a stack trace of this exception, including the wrapped exception.
|
Element |
toErrorResponse()
Convert this
MOAException to an ErrorResponse
element from the MOA namespace. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public MOAException(String messageId, Object[] parameters)
MOAException
.messageId
- The message ID of the message contained in the created
MOAException
.parameters
- The parameters needed to fill in the message arguments.public MOAException(String messageId, Object[] parameters, Throwable wrapped)
MOAException
.messageId
- The message ID of the message contained in the created
MOAException
.parameters
- The parameters needed to fill in the message arguments.wrapped
- The exception wrapped by the created
MOAException
.public String getMessageId()
public Throwable getWrapped()
MOAException
.null
, if none was provided at construction time.public Element toErrorResponse()
MOAException
to an ErrorResponse
element from the MOA namespace.ErrorResponse
element, containing the subelements
ErrorCode
and Info
required by the MOA schema.public void printStackTrace()
System.err
.printStackTrace
in class Throwable
Throwable.printStackTrace()
public void printStackTrace(PrintStream s)
printStackTrace
in class Throwable
s
- The stream to write the stack trace to.Throwable.printStackTrace(java.io.PrintStream)
public void printStackTrace(PrintWriter s)
printStackTrace
in class Throwable
s
- The stream to write the stacktrace to.Throwable.printStackTrace(java.io.PrintWriter)
Copyright © 2016. All rights reserved.