public class ErrorMessage extends Object
Modifier and Type | Field and Description |
---|---|
protected Throwable |
cause
The cause of this error, or null if none is recorded
|
protected int |
code
An error code
|
protected String |
detailedMessage
The detailed instance message of this error, not always set
|
protected String |
message
The short message of this error, always set
|
Constructor and Description |
---|
ErrorMessage()
Create an invalid instance for a subclass to initialize.
|
ErrorMessage(int code,
String message) |
ErrorMessage(int code,
String message,
String detailedMessage)
Create an application specific error message with an application
specific code
|
ErrorMessage(int code,
String message,
String detailedMessage,
Throwable cause)
Create an application specific error message with an application specific code
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Two error messages are equal if they have the same code and message.
|
Throwable |
getCause()
Returns the cause of this, or null if none is set
|
int |
getCode() |
String |
getDetailedMessage()
Returns the detailed message, or null if there is no detailed message
|
String |
getMessage() |
int |
hashCode() |
void |
setCause(Throwable cause)
Sets the cause of this.
|
String |
toString() |
protected int code
protected String message
protected String detailedMessage
protected Throwable cause
public ErrorMessage()
public ErrorMessage(int code, String message)
public ErrorMessage(int code, String message, String detailedMessage)
public int getCode()
public String getMessage()
public String getDetailedMessage()
public void setCause(Throwable cause)
public Throwable getCause()
public boolean equals(Object o)
Copyright © 2017. All rights reserved.