public class ResourceException extends Exception
Constructor and Description |
---|
ResourceException()
Create an exception with a null reason.
|
ResourceException(String reason)
Create an exception with a reason.
|
ResourceException(String reason,
String errorCode)
Create an exception with a reason and an errorCode.
|
ResourceException(String reason,
Throwable throwable)
Create an exception with a reason and an errorCode.
|
ResourceException(Throwable throwable)
Create an exception with a reason and an errorCode.
|
Modifier and Type | Method and Description |
---|---|
String |
getErrorCode()
Get the error code.
|
Exception |
getLinkedException()
Get any linked exception.
|
String |
getMessage()
Get the message composed of the reason and error code.
|
void |
setErrorCode(String errorCode)
Set the error code.
|
void |
setLinkedException(Exception linkedException)
Deprecated.
use initCause
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ResourceException()
public ResourceException(String reason)
reason
- the reasonpublic ResourceException(String reason, String errorCode)
reason
- the reasonerrorCode
- the error codepublic ResourceException(String reason, Throwable throwable)
reason
- the reasonthrowable
- the linked errorpublic ResourceException(Throwable throwable)
throwable
- the linked errorpublic String getErrorCode()
public Exception getLinkedException()
public String getMessage()
getMessage
in class Throwable
public void setErrorCode(String errorCode)
errorCode
- code the error codepublic void setLinkedException(Exception linkedException)
linkedException
- the linked exceptionCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.