|
Cumulus4j API (1.0.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.keymanager.front.shared.Error
public class Error
DTO for sending an error back to the client (KeyManagerAPI
).
It can optionally wrap a Throwable
to provide more precise information
(the type) than just a message.
Constructor Summary | |
---|---|
Error()
Create an empty instance of Error . |
|
Error(String message)
Create an instance of Error with an error message. |
|
Error(Throwable throwable)
Create an instance of Error wrapping a Throwable . |
Method Summary | |
---|---|
String |
getMessage()
Get the error-message. |
String |
getRootMessage()
Get the root- Throwable 's exception-message . |
String |
getRootType()
Get the fully qualified class-name of the root- Throwable in the exception's cause-chain. |
String |
getType()
Get the fully qualified class-name of the wrapped Throwable . |
void |
setMessage(String message)
Set the error-message. |
void |
setRootMessage(String rootMessage)
Set the root- Throwable 's exception-message . |
void |
setRootType(String rootType)
Get the fully qualified class-name of the root- Throwable in the exception's cause-chain. |
void |
setType(String type)
Set the fully qualified class-name of the wrapped Throwable . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Error()
Error
.
Only used for serialisation/deserialisation.
public Error(Throwable throwable)
Error
wrapping a Throwable
.
throwable
- the error to be wrapped and sent back to the client instead of a normal response.public Error(String message)
Error
with an error message.
message
- the message describing what went wrong.Method Detail |
---|
public String getRootType()
Throwable
in the exception's cause-chain.
Throwable
. Can be null
.public void setRootType(String rootType)
Throwable
in the exception's cause-chain.
rootType
- the fully qualified class-name of the root-Throwable
or null
.public String getRootMessage()
Throwable
's exception-message
.
Throwable
in the exception's cause-chain.public void setRootMessage(String rootMessage)
Throwable
's exception-message
.
rootMessage
- the message of the root-Throwable
in the exception's cause-chain.public String getType()
Throwable
.
Throwable
.public void setType(String type)
Throwable
.
type
- the fully qualified class-name of the wrapped Throwable
.public String getMessage()
Error
wraps a Throwable
, this is
Throwable.getMessage()
public void setMessage(String message)
message
- the error-message.
|
Cumulus4j API (1.0.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |