Class OCFCheckedExceptionBase
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AssetLineageException
,CommunityProfileCheckedExceptionBase
,ConnectionCheckedException
,ConnectorCheckedException
,DataEngineException
,DataEngineProxyException
,DinoViewServiceException
,DiscoveryEngineException
,GovernanceActionEngineException
,InvalidParameterException
,NoConnectedAssetException
,OMAGCheckedExceptionBase
,OMAGConfigurationErrorException
,OMAGInvalidParameterException
,OMAGNotAuthorizedException
,OMRSCheckedExceptionBase
,OpenLineageException
,PropertyServerException
,RexViewServiceException
,ServerAuthorViewServiceException
,TexViewServiceException
,UserNotAuthorizedException
public abstract class OCFCheckedExceptionBase extends java.lang.Exception
OCFCheckedExceptionBase provides a checked exception for reporting errors found when using OCF connectors. Typically these errors are either configuration or operational errors that can be fixed by an administrator or power user. However, there may be the odd bug that surfaces here. The OCFErrorCode can be used with this exception to populate it with standard messages. Otherwise messages defined uniquely for a ConnectorProvider/Connector implementation can be used. 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 OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String systemAction, java.lang.String userAction)
Deprecated.OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String errorMessageId, java.lang.String[] errorMessageParameters, java.lang.String systemAction, java.lang.String userAction, java.lang.String caughtErrorClassName, java.util.Map<java.lang.String,java.lang.Object> relatedProperties)
This is the constructor used when receiving an exception from a remote server.OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String systemAction, java.lang.String userAction, java.lang.Throwable caughtError)
Deprecated.OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String systemAction, java.lang.String userAction, java.lang.Throwable caughtError, java.util.Map<java.lang.String,java.lang.Object> relatedProperties)
Deprecated.OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String systemAction, java.lang.String userAction, java.util.Map<java.lang.String,java.lang.Object> relatedProperties)
Deprecated.OCFCheckedExceptionBase(java.lang.String errorMessage, OCFCheckedExceptionBase template)
This is the copy/clone constructor used for creating an OCFCheckedException.OCFCheckedExceptionBase(ExceptionMessageDefinition messageDefinition, java.lang.String className, java.lang.String actionDescription)
This is the typical constructor used for creating an exception.OCFCheckedExceptionBase(ExceptionMessageDefinition messageDefinition, java.lang.String className, java.lang.String actionDescription, java.lang.Throwable caughtError)
This is the constructor used for creating an exception when an unexpected error has been caught.OCFCheckedExceptionBase(ExceptionMessageDefinition messageDefinition, java.lang.String className, java.lang.String actionDescription, java.lang.Throwable caughtError, java.util.Map<java.lang.String,java.lang.Object> relatedProperties)
This is the constructor used for creating an exception when an unexpected error has been caught.OCFCheckedExceptionBase(ExceptionMessageDefinition messageDefinition, java.lang.String className, java.lang.String actionDescription, java.util.Map<java.lang.String,java.lang.Object> relatedProperties)
This is the typical constructor used for creating an exception.OCFCheckedExceptionBase(OCFCheckedExceptionBase template)
This is the copy/clone constructor used for creating an OCFCheckedException.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object objectToCompare)
Compare the values of the supplied object with those stored in the current object.java.lang.String
getErrorMessage()
Deprecated.java.util.Map<java.lang.String,java.lang.Object>
getRelatedProperties()
Return any additional properties that were added to the exception to aid diagnosis.java.lang.Throwable
getReportedCaughtException()
An exception that was caught and wrapped by this exception.java.lang.String
getReportedCaughtExceptionClassName()
An exception that was caught and wrapped by this exception.java.lang.String
getReportedErrorMessage()
A formatted short description of the cause of the condition that resulted in this exception.java.lang.String
getReportedErrorMessageId()
Return the formal message identifier for the error message.java.lang.String[]
getReportedErrorMessageParameters()
Return the parameters that were inserted in the error message.int
getReportedHTTPCode()
Return the HTTP response code to use with this exception.java.lang.String
getReportedSystemAction()
A description of the action that the system took as a result of the error condition.java.lang.String
getReportedUserAction()
A description of the action necessary to correct the error.java.lang.String
getReportingActionDescription()
The type of request that the class was performing when the condition occurred that resulted in this exception.java.lang.String
getReportingClassName()
The class that created this exception.int
hashCode()
Provide a common implementation of hashCode for all OCF Exception objects.java.lang.String
toString()
Standard toString method.
-
-
-
Constructor Detail
-
OCFCheckedExceptionBase
public OCFCheckedExceptionBase(ExceptionMessageDefinition messageDefinition, java.lang.String className, java.lang.String actionDescription)
This is the typical constructor used for creating an exception.- Parameters:
messageDefinition
- content of the messageclassName
- name of class reporting erroractionDescription
- description of function it was performing when error detected
-
OCFCheckedExceptionBase
public OCFCheckedExceptionBase(ExceptionMessageDefinition messageDefinition, java.lang.String className, java.lang.String actionDescription, java.util.Map<java.lang.String,java.lang.Object> relatedProperties)
This is the typical constructor used for creating an exception. 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.
-
OCFCheckedExceptionBase
public OCFCheckedExceptionBase(ExceptionMessageDefinition messageDefinition, java.lang.String className, java.lang.String actionDescription, java.lang.Throwable caughtError)
This is the constructor used for creating an exception 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
-
OCFCheckedExceptionBase
public OCFCheckedExceptionBase(ExceptionMessageDefinition messageDefinition, java.lang.String className, java.lang.String actionDescription, java.lang.Throwable caughtError, java.util.Map<java.lang.String,java.lang.Object> relatedProperties)
This is the constructor used for creating an exception 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.
-
OCFCheckedExceptionBase
public OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String errorMessageId, java.lang.String[] errorMessageParameters, java.lang.String systemAction, java.lang.String userAction, java.lang.String caughtErrorClassName, java.util.Map<java.lang.String,java.lang.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.
-
OCFCheckedExceptionBase
@Deprecated public OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String systemAction, java.lang.String userAction)
Deprecated.This is a deprecated constructor used for creating an OCFCheckedException.- 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
-
OCFCheckedExceptionBase
@Deprecated public OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String systemAction, java.lang.String userAction, java.util.Map<java.lang.String,java.lang.Object> relatedProperties)
Deprecated.This is the typical constructor used for creating an OCFCheckedException.- 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.
-
OCFCheckedExceptionBase
@Deprecated public OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String systemAction, java.lang.String userAction, java.lang.Throwable caughtError)
Deprecated.This is the constructor used for creating an OCFCheckedException when an unexpected error has been caught.- 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
-
OCFCheckedExceptionBase
@Deprecated public OCFCheckedExceptionBase(int httpCode, java.lang.String className, java.lang.String actionDescription, java.lang.String errorMessage, java.lang.String systemAction, java.lang.String userAction, java.lang.Throwable caughtError, java.util.Map<java.lang.String,java.lang.Object> relatedProperties)
Deprecated.This is the constructor used for creating an OCFCheckedException when an unexpected error has been caught.- 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.
-
OCFCheckedExceptionBase
public OCFCheckedExceptionBase(java.lang.String errorMessage, OCFCheckedExceptionBase template)
This is the copy/clone constructor used for creating an OCFCheckedException.- Parameters:
errorMessage
- message for the exception - overrides the value from the caught exceptiontemplate
- object to copy
-
OCFCheckedExceptionBase
public OCFCheckedExceptionBase(OCFCheckedExceptionBase template)
This is the copy/clone constructor used for creating an OCFCheckedException.- Parameters:
template
- object to copy
-
-
Method Detail
-
getReportedHTTPCode
public int getReportedHTTPCode()
Return the HTTP response code to use with this exception.- Returns:
- reportedHTTPCode
-
getReportingClassName
public java.lang.String getReportingClassName()
The class that created this exception.- Returns:
- reportingClassName
-
getReportingActionDescription
public java.lang.String getReportingActionDescription()
The type of request that the class was performing when the condition occurred that resulted in this exception.- Returns:
- reportingActionDescription
-
getErrorMessage
@Deprecated public java.lang.String getErrorMessage()
Deprecated.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. The method is deprecated because it is inconsistent in its naming compared with other methods.- Returns:
- string message
-
getReportedErrorMessage
public java.lang.String 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
public java.lang.String 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
public java.lang.String[] 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
public java.lang.String getReportedSystemAction()
A description of the action that the system took as a result of the error condition.- Returns:
- reportedSystemAction
-
getReportedUserAction
public java.lang.String getReportedUserAction()
A description of the action necessary to correct the error.- Returns:
- reportedUserAction
-
getReportedCaughtException
public java.lang.Throwable 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
public java.lang.String 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
public java.util.Map<java.lang.String,java.lang.Object> getRelatedProperties()
Return any additional properties that were added to the exception to aid diagnosis.- Returns:
- property map
-
equals
public boolean equals(java.lang.Object objectToCompare)
Compare the values of the supplied object with those stored in the current object.- Overrides:
equals
in classjava.lang.Object
- Parameters:
objectToCompare
- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()
Provide a common implementation of hashCode for all OCF Exception objects.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- integer hash code based on the values in the attributes
-
toString
public java.lang.String toString()
Standard toString method.- Overrides:
toString
in classjava.lang.Throwable
- Returns:
- print out of variables in a JSON-style
-
-