Package com.yahoo.processing.request
Class ErrorMessage
java.lang.Object
com.yahoo.processing.request.ErrorMessage
- All Implemented Interfaces:
Cloneable
An error encountered while processing a request.
This can be subclassed to add error messages containing more information.
Error messages are immutable.
- Author:
- bratseth
-
Constructor Summary
ConstructorDescriptionErrorMessage
(int code, String message) Creates an errorErrorMessage
(int code, String message, String details) Creates an errorErrorMessage
(int code, String message, String details, Throwable cause) Creates an errorErrorMessage
(int code, String message, Throwable cause) Creates an errorErrorMessage
(String message) Creates an errorErrorMessage
(String message, String details) Creates an errorErrorMessage
(String message, String details, Throwable cause) Creates an errorErrorMessage
(String message, Throwable cause) Creates an error -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Two error messages are equal if they have the same code and message.getCause()
Returns the throwable associated with this error, or null if noneint
getCode()
Returns the code of this message, or 0 if no code is setReturns detailed information about this error, or null if there is no detailed messageReturns the error message, never nullint
hashCode()
toString()
Returns a formatted message containing the information in this
-
Constructor Details
-
ErrorMessage
Creates an error- Parameters:
message
- the textual message describing this condition tersely
-
ErrorMessage
Creates an error- Parameters:
message
- the textual message describing this condition terselycode
- an error code. If this is bound to HTTP request/responses and this error code is a HTTP status code, this code will be returned as the HTTP status
-
ErrorMessage
Creates an error- Parameters:
message
- the textual message describing this condition terselydetails
- a longer detail description of this condition
-
ErrorMessage
Creates an error- Parameters:
message
- the textual message describing this condition terselycode
- an error code. If this is bound to HTTP request/responses and this error code is a HTTP status code, this code will be returned as the HTTP statusdetails
- a longer detail description of this condition
-
ErrorMessage
Creates an error- Parameters:
message
- the textual message describing this condition terselycause
- the cause of this error
-
ErrorMessage
Creates an error- Parameters:
code
- an error code. If this is bound to HTTP request/responses and this error code is a HTTP status code, this code will be returned as the HTTP statusmessage
- the textual message describing this condition terselycause
- the cause of this error
-
ErrorMessage
Creates an error- Parameters:
message
- the textual message describing this condition terselydetails
- a longer detail description of this conditioncause
- the cause of this error
-
ErrorMessage
Creates an error- Parameters:
code
- an error code. If this is bound to HTTP request/responses and this error code is a HTTP status code, this code will be returned as the HTTP statusmessage
- the textual message describing this condition terselydetails
- a longer detail description of this conditioncause
- the cause of this error
-
-
Method Details
-
getCode
public int getCode()Returns the code of this message, or 0 if no code is set -
getMessage
Returns the error message, never null -
getDetailedMessage
Returns detailed information about this error, or null if there is no detailed message -
getCause
Returns the throwable associated with this error, or null if none -
toString
Returns a formatted message containing the information in this -
hashCode
public int hashCode() -
equals
Two error messages are equal if they have the same code and message. The cause is ignored in the comparison. -
clone
-