Class AppianRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.appiancorp.suiteapi.common.exceptions.AppianRuntimeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AppianPrivilegeNotFoundException
,DecryptionException
,EncryptionException
,EPExException
,InvalidRankNameException
,InvalidTypeException
,LocalizedAppianRuntimeException
,NullUserRenameException
,RetryableAppianRuntimeException
,ToggledOffException
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 exception- See Also:
-
Constructor Summary
ModifierConstructorDescriptionAppianRuntimeException
(AppianException delegate) AppianRuntimeException
(ErrorCode errorCode, Object... errorCodeArgs) Constructs a new exception with the specified error code.protected
AppianRuntimeException
(Throwable cause, AppianException delegate) AppianRuntimeException
(Throwable cause, ErrorCode errorCode, Object... errorCodeArgs) Constructs a new exception with the specified cause and error code. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getCause()
Object[]
protected Object[]
getErrorCodeArguments
(Locale locale) String[]
getLocalizedMessage
(Locale locale) getLocalizedTitle
(Locale locale) int
hashCode()
boolean
isDelegateInstanceOf
(Class<? extends AppianException> targetExceptionClass) Convenience method that returns whether thedelegate AppianException
is an instance of the given class.void
void
void
void
setStackTrace
(StackTraceElement[] stackTrace) toString()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getSuppressed
-
Constructor Details
-
AppianRuntimeException
Constructs a new exception with the specified error code.- Parameters:
errorCode
- the error codeerrorCodeArgs
- the arguments to use for the error code message
-
AppianRuntimeException
Constructs a new exception with the specified cause and error code.- Parameters:
cause
- the cause (which is saved for later retrieval by thegetCause()
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 message
-
AppianRuntimeException
-
AppianRuntimeException
-
-
Method Details
-
toAppianException
-
isDelegateInstanceOf
Convenience method that returns whether thedelegate AppianException
is an instance of the given class. -
getErrorCode
-
getErrorCodeArguments
-
getErrorCodeArguments
-
getMessage
- Overrides:
getMessage
in classThrowable
-
getLocalizedMessage
- Overrides:
getLocalizedMessage
in classThrowable
-
getLocalizedMessage
-
getLocalizedTitle
-
getLocalizedMessageWithErrorCode
-
toString
-
equals
-
getCause
-
hashCode
public int hashCode() -
initCause
-
printStackTrace
public void printStackTrace()- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-
getStackTrace
- Overrides:
getStackTrace
in classThrowable
-
setStackTrace
- Overrides:
setStackTrace
in classThrowable
-
getErrorCodeArgumentsAsStringArray
-