Class ProtectorException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.protegrity.ap.java.ProtectorException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SessionTimeoutException

public class ProtectorException extends Exception
Exception class for Protector API operations.

This exception signals error conditions during data protection operations and includes error codes, messages, and operation details for comprehensive error handling.

Since:
1.0.1
Author:
Protegrity
See Also:
  • Field Details

    • errorCode

      public int errorCode
      The error code associated with this exception.
    • errorMessage

      public String errorMessage
      The detailed error message.
    • errorList

      public int[] errorList
      Array of error codes for bulk operations.
    • noAccessOperation

      public int noAccessOperation
      The operation that was not accessible.
  • Constructor Details

    • ProtectorException

      public ProtectorException(int errorCode, String errorMessage, int[] errorList, int noAccessOperation)
      Constructs a new ProtectorException with full error details.
      Parameters:
      errorCode - the error code
      errorMessage - the error message
      errorList - array of error codes for bulk operations
      noAccessOperation - the operation that was not accessible
    • ProtectorException

      public ProtectorException(int errorCode, String errorMessage, int[] errorList)
      Constructs a new ProtectorException with error code, message, and error list.
      Parameters:
      errorCode - the error code
      errorMessage - the error message
      errorList - array of error codes for bulk operations
    • ProtectorException

      public ProtectorException(int errorCode, String errorMessage)
      Constructs a new ProtectorException with error code and message.
      Parameters:
      errorCode - the error code
      errorMessage - the error message
    • ProtectorException

      public ProtectorException(String errorMessage)
      Constructs a new ProtectorException with only an error message.
      Parameters:
      errorMessage - the error message
    • ProtectorException

      public ProtectorException(String message, Throwable cause)
      Constructs a new ProtectorException with a message and cause.
      Parameters:
      message - the error message
      cause - the underlying cause of the exception
  • Method Details

    • getErrorList

      public int[] getErrorList()
      Returns the array of error codes for bulk operations.
      Returns:
      the error list array
    • getAccessOperation

      public int getAccessOperation()
      Returns the operation that was not accessible.
      Returns:
      the no-access operation code
    • getErrorCode

      public int getErrorCode()
      Returns the error code.
      Returns:
      the error code
    • setErrorCode

      public void setErrorCode(int errorCode)
      Sets the error code.
      Parameters:
      errorCode - the error code to set
    • getErrorMessage

      public String getErrorMessage()
      Returns the error message.
      Returns:
      the error message
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
      Sets the error message.
      Parameters:
      errorMessage - the error message to set
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable