Package com.appiancorp.exceptions
Class AppianErrorCode
java.lang.Object
com.appiancorp.exceptions.AppianErrorCode
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ErrorCode
,ValidationCode
- See Also:
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
AppianErrorCode
(String code) protected
AppianErrorCode
(String code, boolean hasTitle) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
int
getMessage
(AppianErrorCodeFormatter callback, Object... arguments) getMessageWithCode
(AppianErrorCodeFormatter callback, Object... arguments) int
getTitle
(AppianErrorCodeTitleFormatter callback, Object... arguments) int
hashCode()
final boolean
hasTitle()
Indicates whether or not the given ErrorCode has a title corresponding to its message.static AppianErrorCode
toErrorCode
(String code) Returns the error code.toString()
-
Constructor Details
-
AppianErrorCode
protected AppianErrorCode() -
AppianErrorCode
- Throws:
AppianErrorCode.InvalidErrorCode
-
AppianErrorCode
- Throws:
AppianErrorCode.InvalidErrorCode
-
-
Method Details
-
hasTitle
public final boolean hasTitle()Indicates whether or not the given ErrorCode has a title corresponding to its message.- Returns:
- true if the error code has a title
-
toErrorCode
Returns the error code. Will return null if the error code is not found. Codes should generally be referenced explicitly from a static member ofErrorCode
. This is used currently in GWT and PMM Connected Environments so the server can send down the string code of an ErrorCode and an instance can be returned from the string code. See https://source.appian.com/cru/CR-AE-1752#CFR-23290- Parameters:
code
- The string representation of an error code, example APNX-1-0000-000- Returns:
- An
AppianErrorCode
-
getNamespace
public int getNamespace() -
getCategory
public int getCategory() -
getDetail
public int getDetail() -
equals
-
hashCode
public int hashCode() -
toString
-
getMessage
-
getTitle
-
getMessageWithCode
-