public class AppianRuntimeException
extends java.lang.RuntimeException
AppianRuntimeException
is the base class of all application-level
runtime exceptions thrown in the product. AppianRuntimeException takes care of properly
formatting and internationalizing the exception messages by associating the
exception with an error code. Subclasses should override the getErrorCode and
getErrorCodeArguments methods to map the appropriate message to the
exception.
This class acts as a wrapper around an equivalent AppianException
. Use
toAppianException()
to get the equivalent checked exceptionAppianException
,
Serialized FormModifier | Constructor and Description |
---|---|
|
AppianRuntimeException(AppianException delegate) |
|
AppianRuntimeException(ErrorCode errorCode,
java.lang.Object... errorCodeArgs)
Constructs a new exception with the specified error code.
|
protected |
AppianRuntimeException(java.lang.Throwable cause,
AppianException delegate) |
|
AppianRuntimeException(java.lang.Throwable cause,
ErrorCode errorCode,
java.lang.Object... errorCodeArgs)
Constructs a new exception with the specified cause and error code.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Throwable |
getCause() |
ErrorCode |
getErrorCode()
|
java.lang.Object[] |
getErrorCodeArguments()
|
protected java.lang.Object[] |
getErrorCodeArguments(java.util.Locale locale)
|
java.lang.String[] |
getErrorCodeArgumentsAsStringArray(java.util.Locale locale) |
java.lang.String |
getLocalizedMessage()
|
java.lang.String |
getLocalizedMessage(java.util.Locale locale)
|
java.lang.String |
getLocalizedMessageWithErrorCode(java.util.Locale locale)
|
java.lang.String |
getLocalizedTitle(java.util.Locale locale)
|
java.lang.String |
getMessage()
|
java.lang.StackTraceElement[] |
getStackTrace() |
int |
hashCode() |
java.lang.Throwable |
initCause(java.lang.Throwable cause) |
boolean |
isDelegateInstanceOf(java.lang.Class<? extends AppianException> targetExceptionClass)
Convenience method that returns whether the
delegate AppianException is an instance of the given class. |
void |
printStackTrace() |
void |
printStackTrace(java.io.PrintStream s) |
void |
printStackTrace(java.io.PrintWriter s) |
void |
setStackTrace(java.lang.StackTraceElement[] stackTrace) |
AppianException |
toAppianException() |
java.lang.String |
toString()
|
public AppianRuntimeException(ErrorCode errorCode, java.lang.Object... errorCodeArgs)
errorCode
- the error codeerrorCodeArgs
- the arguments to use for the error code messagepublic AppianRuntimeException(java.lang.Throwable cause, ErrorCode errorCode, java.lang.Object... errorCodeArgs)
cause
- the cause (which is saved for later retrieval by the getCause()
method).
(A null value is permitted, and indicates that the cause is nonexistent or unknown.)errorCode
- the error codeerrorCodeArgs
- the arguments to use for the error code messageprotected AppianRuntimeException(java.lang.Throwable cause, AppianException delegate)
public AppianRuntimeException(AppianException delegate)
public AppianException toAppianException()
public boolean isDelegateInstanceOf(java.lang.Class<? extends AppianException> targetExceptionClass)
delegate AppianException
is an instance of the given class.public ErrorCode getErrorCode()
public java.lang.Object[] getErrorCodeArguments()
protected java.lang.Object[] getErrorCodeArguments(java.util.Locale locale)
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getLocalizedMessage()
getLocalizedMessage
in class java.lang.Throwable
public java.lang.String getLocalizedMessage(java.util.Locale locale)
public java.lang.String getLocalizedTitle(java.util.Locale locale)
public java.lang.String getLocalizedMessageWithErrorCode(java.util.Locale locale)
public java.lang.String toString()
toString
in class java.lang.Throwable
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.Throwable getCause()
getCause
in class java.lang.Throwable
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Throwable initCause(java.lang.Throwable cause)
initCause
in class java.lang.Throwable
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream s)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter s)
printStackTrace
in class java.lang.Throwable
public java.lang.StackTraceElement[] getStackTrace()
getStackTrace
in class java.lang.Throwable
public void setStackTrace(java.lang.StackTraceElement[] stackTrace)
setStackTrace
in class java.lang.Throwable
public java.lang.String[] getErrorCodeArgumentsAsStringArray(java.util.Locale locale)
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.