Class SzException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SzBadInputException, SzReplaceConflictException

public class SzException extends Exception
Defines the base exception for Senzing errors. This adds a property for the numeric Senzing error code which can optionally be set.
See Also:
  • Constructor Details

    • SzException

      public SzException()
      Default constructor.
    • SzException

      public SzException(String message)
      Constructs with a message explaing the reason for the exception.
      Parameters:
      message - The message explaining the reason for the exception.
    • SzException

      public SzException(int errorCode, String message)
      Constructs with a message explaing the reason for the exception.
      Parameters:
      errorCode - The underlying Senzing error code.
      message - The message explaining the reason for the exception.
    • SzException

      public SzException(Throwable cause)
      Constructs with the Throwable that is the underlying cause for the exception.
      Parameters:
      cause - The underlying cause for the exception.
    • SzException

      public SzException(String message, Throwable cause)
      Constructs with a message explaing the reason for the exception and the Throwable that is the underlying cause for the exception.
      Parameters:
      message - The message explaining the reason for the exception.
      cause - The underlying cause for the exception.
    • SzException

      public SzException(int errorCode, String message, Throwable cause)
      Constructs with the Senzing error code, the message explaing the reason for the exception and the Throwable that is the underlying cause for the exception.
      Parameters:
      errorCode - The underlying Senzing error code.
      message - The message explaining the reason for the exception.
      cause - The underlying cause for the exception.
  • Method Details

    • getErrorCode

      public Integer getErrorCode()
      Gets the underlying Senzing error code associated with the exception. This returns null if no error code was associated with the exception.
      Returns:
      The underlying Senzing error code associated with the exception, or null if none was associated.