Class ConformanceSuiteRuntimeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.odpi.openmetadata.conformance.ffdc.exception.ConformanceSuiteRuntimeException
All Implemented Interfaces:
Serializable

public class ConformanceSuiteRuntimeException extends RuntimeException
ConformanceSuiteRuntimeException is used for all logic errors detected by the Open Metadata Conformance Suite. It is used in conjunction with the ConformanceSuiteErrorCode to provide first failure data capture for these errors.
See Also:
  • Constructor Details

    • ConformanceSuiteRuntimeException

      public ConformanceSuiteRuntimeException(ExceptionMessageDefinition messageDefinition, String className, String actionDescription)
      This is the typical constructor used for creating an exception.
      Parameters:
      messageDefinition - content of the message
      className - name of class reporting error
      actionDescription - description of function it was performing when error detected
    • ConformanceSuiteRuntimeException

      public ConformanceSuiteRuntimeException(ExceptionMessageDefinition messageDefinition, String className, String actionDescription, Map<String,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 message
      className - name of class reporting error
      actionDescription - description of function it was performing when error detected
      relatedProperties - arbitrary properties that may help with diagnosing the problem.
    • ConformanceSuiteRuntimeException

      public ConformanceSuiteRuntimeException(ExceptionMessageDefinition messageDefinition, String className, String actionDescription, 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 message
      className - name of class reporting error
      actionDescription - description of function it was performing when error detected
      caughtError - previous error causing this exception
    • ConformanceSuiteRuntimeException

      public ConformanceSuiteRuntimeException(ExceptionMessageDefinition messageDefinition, String className, String actionDescription, Throwable caughtError, Map<String,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 message
      className - name of class reporting error
      actionDescription - description of function it was performing when error detected
      caughtError - previous error causing this exception
      relatedProperties - arbitrary properties that may help with diagnosing the problem.
    • ConformanceSuiteRuntimeException

      public ConformanceSuiteRuntimeException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Map<String,Object> relatedProperties)
      This is the typical constructor used for creating an exception.
      Parameters:
      httpCode - http response code to use if this exception flows over a rest call
      className - name of class reporting error
      actionDescription - description of function it was performing when error detected
      errorMessage - description of error
      systemAction - actions of the system as a result of the error
      userAction - instructions for correcting the error
      relatedProperties - arbitrary properties that may help with diagnosing the problem.
    • ConformanceSuiteRuntimeException

      public ConformanceSuiteRuntimeException(int httpCode, String className, String actionDescription, String errorMessage, String systemAction, String userAction, Exception caughtError, Map<String,Object> relatedProperties)
      This is the constructor used for creating an exception when an unexpected error has been caught.
      Parameters:
      httpCode - http response code to use if this exception flows over a rest call
      className - name of class reporting error
      actionDescription - description of function it was performing when error detected
      errorMessage - description of error
      systemAction - actions of the system as a result of the error
      userAction - instructions for correcting the error
      caughtError - previous error causing this exception
      relatedProperties - 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

      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

      @Deprecated public 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 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 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 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 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 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 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 Map<String,Object> getRelatedProperties()
      Return any additional properties that were added to the exception to aid diagnosis.
      Returns:
      property map
    • equals

      public boolean equals(Object objectToCompare)
      Compare the values of the supplied object with those stored in the current object.
      Overrides:
      equals in class 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 class Object
      Returns:
      integer hash code based on the values in the attributes
    • toString

      public String toString()
      Standard toString method.
      Overrides:
      toString in class Throwable
      Returns:
      print out of variables in a JSON-style