public class TkException extends RuntimeException
getErrorCode()
must be inspected.Constructor and Description |
---|
TkException()
Creates an empty TkException.
|
TkException(String errorCode)
Creates a TkException with the given error code.
|
TkException(TkErrorDescriptor tkErrorDescriptor)
Creates a new TkException with the given error descriptor.
|
Modifier and Type | Method and Description |
---|---|
String |
getErrorCode()
Returns the exception's error code.
|
String |
getMessage()
Returns the exception's error message.
|
TkErrorDescriptor |
getTkErrorDescriptor()
Returns the exception's inner error descriptor.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public TkException()
public TkException(String errorCode)
errorCode
- the error code of the TkException. Note that this constructor will create a
TkErrorDescriptor
with this error code internally.public TkException(TkErrorDescriptor tkErrorDescriptor)
tkErrorDescriptor
- the TkErrorDescriptor to be set for the TkException.public String getMessage()
TkErrorDescriptor.getErrorMessage()
on the inner error descriptor.getMessage
in class Throwable
public TkErrorDescriptor getTkErrorDescriptor()
public String getErrorCode()
TkErrorDescriptor.getErrorCode()
on the inner error descriptor.