Class RESTClientCheckedExceptionBase
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.odpi.openmetadata.adapters.connectors.restclients.ffdc.exceptions.RESTClientCheckedExceptionBase
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RESTConfigurationException
,RESTServerException
RESTClientCheckedExceptionBase provides a checked exception for reporting errors found when using
the Egeria services.
Typically, these errors are either configuration or operational errors that can be fixed by an administrator
or the developer that wrote the consuming service. However, there may be the odd bug that surfaces here.
The AssetConsumerErrorCode can be used with this exception to populate it with standard messages.
The aim is to be able to uniquely identify the cause and remedy for the error.
- See Also:
-
Constructor Summary
ConstructorDescriptionRESTClientCheckedExceptionBase
(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) This is the typical constructor used for creating an exception.RESTClientCheckedExceptionBase
(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Exception caughtError) This is the constructor used for creating an exception that resulted from a previous error. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return comparison result based on the content of the properties.A formatted short description of the cause of the condition that resulted in this exception.An exception that was caught and wrapped by this exception.int
Return the HTTP response code to use with this exception.A description of the action that the system took as a result of the error condition.A description of the action necessary to correct the error.The type of request that the class was performing when the condition occurred that resulted in this exception.The class that created this exception.int
hashCode()
Return hash code for this objectMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RESTClientCheckedExceptionBase
public RESTClientCheckedExceptionBase(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction) This is the typical constructor used for creating an exception.- Parameters:
httpCode
- http response code to use if this exception flows over a rest callclassName
- name of class reporting erroractionDescription
- description of function it was performing when error detectederrorMessage
- description of errorsystemAction
- actions of the system as a result of the erroruserAction
- instructions for correcting the error
-
RESTClientCheckedExceptionBase
public RESTClientCheckedExceptionBase(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Exception caughtError) This is the constructor used for creating an exception that resulted from a previous error.- Parameters:
httpCode
- http response code to use if this exception flows over a rest callclassName
- name of class reporting erroractionDescription
- description of function it was performing when error detectederrorMessage
- description of errorsystemAction
- actions of the system as a result of the erroruserAction
- instructions for correcting the errorcaughtError
- the error that resulted in this exception.
-
-
Method Details
-
getReportedHTTPCode
public int getReportedHTTPCode()Return the HTTP response code to use with this exception.- Returns:
- reportedHTTPCode
-
getReportingClassName
The class that created this exception.- Returns:
- reportingClassName
-
getReportingActionDescription
The type of request that the class was performing when the condition occurred that resulted in this exception.- Returns:
- reportingActionDescription
-
getErrorMessage
A formatted short description of the cause of the condition that resulted in this exception.- Returns:
- reportedErrorMessage
-
getReportedSystemAction
A description of the action that the system took as a result of the error condition.- Returns:
- reportedSystemAction
-
getReportedUserAction
A description of the action necessary to correct the error.- Returns:
- reportedUserAction
-
getReportedCaughtException
An exception that was caught and wrapped by this exception. If a null is returned, then this exception is newly created and not the result of a previous exception.- Returns:
- reportedCaughtException
-
equals
Return comparison result based on the content of the properties. -
hashCode
public int hashCode()Return hash code for this object
-