Class OCFRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.odpi.openmetadata.frameworks.connectors.ffdc.OCFRuntimeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
GAFRuntimeException
,OMAGRuntimeException
OCFRuntimeException is used for all runtime exceptions generated by the OCF. The OCFErrorCode provides
first failure data capture information for this exception, although this information can also be provided
using custom values.
- See Also:
-
Constructor Summary
ConstructorDescriptionOCFRuntimeException
(int httpCode, String className, String actionDescription, String errorMessage, String errorMessageId, String[] errorMessageParameters, String systemAction, String userAction, String caughtErrorClassName, Map<String, Object> relatedProperties) This is the constructor used when receiving an exception from a remote server.OCFRuntimeException
(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) Deprecated.OCFRuntimeException
(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError, Map<String, Object> relatedProperties) Deprecated.OCFRuntimeException
(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Map<String, Object> relatedProperties) Deprecated.OCFRuntimeException
(String errorMessage, OCFRuntimeException template) This is the copy/clone constructor used for creating an OCFRuntimeException.OCFRuntimeException
(ExceptionMessageDefinition messageDefinition, String className, String actionDescription) This is the typical constructor used for creating an OCFRuntimeException.OCFRuntimeException
(ExceptionMessageDefinition messageDefinition, String className, String actionDescription, Throwable caughtError) This is the constructor used for creating an OCFRuntimeException when an unexpected error has been caught.OCFRuntimeException
(ExceptionMessageDefinition messageDefinition, String className, String actionDescription, Throwable caughtError, Map<String, Object> relatedProperties) This is the constructor used for creating an OCFRuntimeException when an unexpected error has been caught.OCFRuntimeException
(ExceptionMessageDefinition messageDefinition, String className, String actionDescription, Map<String, Object> relatedProperties) This is the typical constructor used for creating an OCFRuntimeException.OCFRuntimeException
(OCFRuntimeException template) This is the copy/clone constructor used for creating an OCFRuntimeException. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compare the values of the supplied object with those stored in the current object.Return any additional properties that were added to the exception to aid diagnosis.An exception that was caught and wrapped by this exception.An exception that was caught and wrapped by this exception.A formatted short description of the cause of the condition that resulted in this exception.Return the formal message identifier for the error message.String[]
Return the parameters that were inserted in the error message.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()
Provide a common implementation of hashCode for all OCF Exception objects.toString()
Standard toString method.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
OCFRuntimeException
public OCFRuntimeException(ExceptionMessageDefinition messageDefinition, String className, String actionDescription) This is the typical constructor used for creating an OCFRuntimeException.- Parameters:
messageDefinition
- content of the messageclassName
- name of class reporting erroractionDescription
- description of function it was performing when error detected
-
OCFRuntimeException
public OCFRuntimeException(ExceptionMessageDefinition messageDefinition, String className, String actionDescription, Map<String, Object> relatedProperties) This is the typical constructor used for creating an OCFRuntimeException. The properties allow additional information to be associated with the exception.- Parameters:
messageDefinition
- content of the messageclassName
- name of class reporting erroractionDescription
- description of function it was performing when error detectedrelatedProperties
- arbitrary properties that may help with diagnosing the problem.
-
OCFRuntimeException
public OCFRuntimeException(ExceptionMessageDefinition messageDefinition, String className, String actionDescription, Throwable caughtError) This is the constructor used for creating an OCFRuntimeException when an unexpected error has been caught. The properties allow additional information to be associated with the exception.- Parameters:
messageDefinition
- content of the messageclassName
- name of class reporting erroractionDescription
- description of function it was performing when error detectedcaughtError
- previous error causing this exception
-
OCFRuntimeException
public OCFRuntimeException(ExceptionMessageDefinition messageDefinition, String className, String actionDescription, Throwable caughtError, Map<String, Object> relatedProperties) This is the constructor used for creating an OCFRuntimeException when an unexpected error has been caught. The properties allow additional information to be associated with the exception.- Parameters:
messageDefinition
- content of the messageclassName
- name of class reporting erroractionDescription
- description of function it was performing when error detectedcaughtError
- previous error causing this exceptionrelatedProperties
- arbitrary properties that may help with diagnosing the problem.
-
OCFRuntimeException
public OCFRuntimeException(int httpCode, String className, String actionDescription, String errorMessage, String errorMessageId, String[] errorMessageParameters, String systemAction, String userAction, String caughtErrorClassName, Map<String, Object> relatedProperties) This is the constructor used when receiving an exception from a remote server. The values are stored directly in the response object and are passed explicitly to the new exception. Notice that the technical aspects of the exception - such as class name creating the exception are local values so that the implementation of the server is not exposed.- 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 errorerrorMessageId
- unique identifier for the messageerrorMessageParameters
- parameters that were inserted in the messagesystemAction
- actions of the system as a result of the erroruserAction
- instructions for correcting the errorcaughtErrorClassName
- previous error causing this exceptionrelatedProperties
- arbitrary properties that may help with diagnosing the problem.
-
OCFRuntimeException
This is the copy/clone constructor used for creating an OCFRuntimeException.- Parameters:
errorMessage
- message for the exception - overrides the value from the caught exceptiontemplate
- object to copy
-
OCFRuntimeException
This is the copy/clone constructor used for creating an OCFRuntimeException.- Parameters:
template
- object to copy
-
OCFRuntimeException
@Deprecated public OCFRuntimeException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Map<String, Object> relatedProperties) Deprecated.This is the typical constructor used for creating an OCFRuntimeException.- 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 errorrelatedProperties
- arbitrary properties that may help with diagnosing the problem.
-
OCFRuntimeException
@Deprecated public OCFRuntimeException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError) Deprecated.This is the constructor used for creating a OCFRuntimeException that results from a previous error/exception being thrown.- 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
- previous error causing this exception
-
OCFRuntimeException
@Deprecated public OCFRuntimeException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Throwable caughtError, Map<String, Object> relatedProperties) Deprecated.This is the constructor used for creating a OCFRuntimeException that results from a previous error/exception being thrown.- 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
- previous error causing this exceptionrelatedProperties
- arbitrary properties that may help with diagnosing the problem.
-
-
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
-
getReportedErrorMessage
A formatted short description of the cause of the condition that resulted in this exception. It includes the message id and is formatted with the message parameters. The message is defined in En_US.- Returns:
- string message
-
getReportedErrorMessageId
Return the formal message identifier for the error message. This is incorporated in the error message. This is provided both for automated processing and to enable the error message to be reformatted in a different language.- Returns:
- string message id
-
getReportedErrorMessageParameters
Return the parameters that were inserted in the error message. These are provided both for automated processing and to enable the error message to be reformatted in a different language.- Returns:
- list of parameter values
-
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 either newly created and not the result of a previous exception or the exception occurred in a remote server. If the second situation is true then reportedCaughtExceptionClassName is set.- Returns:
- reportedCaughtException Throwable object
-
getReportedCaughtExceptionClassName
An exception that was caught and wrapped by this exception. If a null is returned, then this exception is the result of a newly detected error and not caused by another exception.- Returns:
- full class name of the original exception
-
getRelatedProperties
Return any additional properties that were added to the exception to aid diagnosis.- Returns:
- property map
-
equals
Compare the values of the supplied object with those stored in the current object. -
hashCode
public int hashCode()Provide a common implementation of hashCode for all OCF Exception objects. -
toString
Standard toString method.
-