public class ErrorInfo extends Object implements Serializable
null
.Constructor and Description |
---|
ErrorInfo()
Constructs an error info.
|
ErrorInfo(ErrorCode errorCode,
String codeContext,
Severity severity,
String location,
String customErrorCode)
Constructs an error info.
|
ErrorInfo(Throwable throwable,
ErrorCode defaultMetaDataError,
ErrorCode defaultError,
String defaultLocation)
Constructs an error info from the given exception.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getCodeContext() |
String |
getCustomErrorCode() |
ErrorCode |
getErrorCode() |
String |
getLocation() |
Severity |
getSeverity() |
int |
hashCode() |
void |
setCodeContext(String codeContext) |
void |
setCustomErrorCode(String customErrorCode) |
void |
setErrorCode(ErrorCode errorCode) |
void |
setLocation(String location) |
void |
setSeverity(Severity severity) |
String |
toString() |
public ErrorInfo()
public ErrorInfo(ErrorCode errorCode, String codeContext, Severity severity, String location, String customErrorCode)
errorCode
- the error that occurred.codeContext
- the context in which the error occurred.severity
- the severity of the error.location
- the location in which the error occurred.customErrorCode
- user-defined error code for the cases when the errorCode
parameter
equals to ErrorCode._USER_DEFINED
, otherwise will be ignored.public ErrorInfo(Throwable throwable, ErrorCode defaultMetaDataError, ErrorCode defaultError, String defaultLocation)
throwable
- the exception that occurred.defaultMetaDataError
- the default error code for XDSMetaDataException
.defaultError
- the default error code for any other exception.defaultLocation
- default error location.public ErrorCode getErrorCode()
public void setErrorCode(ErrorCode errorCode)
errorCode
- the error that occurred.public String getCodeContext()
public void setCodeContext(String codeContext)
codeContext
- the context in which the error occurred.public Severity getSeverity()
public void setSeverity(Severity severity)
severity
- the severity of the error.public String getLocation()
public void setLocation(String location)
location
- the location in which the error occurred.public String getCustomErrorCode()
public void setCustomErrorCode(String customErrorCode)
Copyright © 2018 Open eHealth Foundation. All rights reserved.