public final class Error extends Object
Constructor and Description |
---|
Error(int code,
String message)
This is the constructor used by anyone adding an error to a message.
|
Error(int code,
String message,
String service)
This constructor is used by the network layer to properly tag deserialized errors with the hostname of whatever
service produced the error.
|
Modifier and Type | Method and Description |
---|---|
int |
getCode()
Return the numerical code of this error.
|
String |
getMessage()
Return the description of this error.
|
String |
getService()
Returns the name of the service on which this error occured.
|
boolean |
isFatal()
Returns whether or not this error is fatal, i.e.
|
String |
toString() |
public Error(int code, String message)
code
- The numerical code of this error.message
- The description of this error.public Error(int code, String message, String service)
code
- The numerical code of this error.message
- The description of this error.service
- The service name of this error.public int getCode()
public String getMessage()
public String getService()
public boolean isFatal()
Copyright © 2018. All rights reserved.