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
public abstract class RESTClientCheckedExceptionBase extends Exception
AssetConsumerCheckedExceptionBase provides a checked exception for reporting errors found when using the Asset Consumer OMAS 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RESTClientCheckedExceptionBase(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object objectToCompare)Return comparison result based on the content of the properties.StringgetErrorMessage()A formatted short description of the cause of the condition that resulted in this exception.ExceptiongetReportedCaughtException()An exception that was caught and wrapped by this exception.intgetReportedHTTPCode()Return the HTTP response code to use with this exception.StringgetReportedSystemAction()A description of the action that the system took as a result of the error condition.StringgetReportedUserAction()A description of the action necessary to correct the error.StringgetReportingActionDescription()The type of request that the class was performing when the condition occurred that resulted in this exception.StringgetReportingClassName()The class that created this exception.inthashCode()Return hash code for this object-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
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 Detail
-
getReportedHTTPCode
public int getReportedHTTPCode()
Return the HTTP response code to use with this exception.- Returns:
- reportedHTTPCode
-
getReportingClassName
public String getReportingClassName()
The class that created this exception.- Returns:
- reportingClassName
-
getReportingActionDescription
public String getReportingActionDescription()
The type of request that the class was performing when the condition occurred that resulted in this exception.- Returns:
- reportingActionDescription
-
getErrorMessage
public String getErrorMessage()
A formatted short description of the cause of the condition that resulted in this exception.- Returns:
- reportedErrorMessage
-
getReportedSystemAction
public String getReportedSystemAction()
A description of the action that the system took as a result of the error condition.- Returns:
- reportedSystemAction
-
getReportedUserAction
public String getReportedUserAction()
A description of the action necessary to correct the error.- Returns:
- reportedUserAction
-
getReportedCaughtException
public Exception 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
public boolean equals(Object objectToCompare)
Return comparison result based on the content of the properties.
-
-