Package com.yahoo.processing.request
Class ErrorMessage
- java.lang.Object
-
- com.yahoo.processing.request.ErrorMessage
-
-
Constructor Summary
Constructors Constructor Description ErrorMessage(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorMessage
clone()
boolean
equals(Object o)
Two error messages are equal if they have the same code and message.Throwable
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 setString
getDetailedMessage()
Returns detailed information about this error, or null if there is no detailed messageString
getMessage()
Returns the error message, never nullint
hashCode()
String
toString()
Returns a formatted message containing the information in this
-
-
-
Constructor Detail
-
ErrorMessage
public ErrorMessage(String message)
Creates an error- Parameters:
message
- the textual message describing this condition tersely
-
ErrorMessage
public ErrorMessage(int code, String message)
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
public ErrorMessage(String message, String details)
Creates an error- Parameters:
message
- the textual message describing this condition terselydetails
- a longer detail description of this condition
-
ErrorMessage
public ErrorMessage(int code, String message, String details)
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
public ErrorMessage(String message, Throwable cause)
Creates an error- Parameters:
message
- the textual message describing this condition terselycause
- the cause of this error
-
ErrorMessage
public ErrorMessage(int code, String message, Throwable cause)
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
public ErrorMessage(String message, String details, Throwable cause)
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
public ErrorMessage(int code, String message, String details, Throwable cause)
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 Detail
-
getCode
public int getCode()
Returns the code of this message, or 0 if no code is set
-
getMessage
public String getMessage()
Returns the error message, never null
-
getDetailedMessage
public String getDetailedMessage()
Returns detailed information about this error, or null if there is no detailed message
-
getCause
public Throwable getCause()
Returns the throwable associated with this error, or null if none
-
toString
public String toString()
Returns a formatted message containing the information in this
-
equals
public boolean equals(Object o)
Two error messages are equal if they have the same code and message. The cause is ignored in the comparison.
-
clone
public ErrorMessage clone()
-
-