public class MOARuntimeException extends RuntimeException
getClause()
method) but will not be used
because of required compatibility with JDK1.3.Constructor and Description |
---|
MOARuntimeException(String messageId,
Object[] parameters)
Create a
MOAException . |
MOARuntimeException(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
MOARuntimeException . |
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
MOARuntimeException to an ErrorResponse
element from the MOA namespace. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public MOARuntimeException(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 MOARuntimeException(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()
MOARuntimeException
.null
, if none was provided at construction time.public Element toErrorResponse()
MOARuntimeException
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.