Class SignServiceIntegrationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
se.idsec.signservice.integration.core.error.SignServiceIntegrationException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NoAccessException, PdfSignaturePageFullException, SignServiceIntegrationCategoryException

public abstract class SignServiceIntegrationException extends Exception
Base class for Sign Service Integration exceptions.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
See Also:
  • Constructor Details

    • SignServiceIntegrationException

      public SignServiceIntegrationException(ErrorCode errorCode, String message)
      Constructor.
      Parameters:
      errorCode - the error code
      message - the error message
    • SignServiceIntegrationException

      public SignServiceIntegrationException(ErrorCode errorCode, String message, Throwable cause)
      Constructor.
      Parameters:
      errorCode - the error code
      message - the error message
      cause - the cause of the error
    • SignServiceIntegrationException

      protected SignServiceIntegrationException(ErrorCode.Code code, String message)
      Constructor. May only be used if the subclass overrides getCategory().
      Parameters:
      code - the error code (within the given category)
      message - the error message
    • SignServiceIntegrationException

      protected SignServiceIntegrationException(ErrorCode.Code code, String message, Throwable cause)
      Constructor. May only be used if the subclass overrides getCategory().
      Parameters:
      code - the error code (within the given category)
      message - the error message
      cause - the cause of the error
  • Method Details

    • getErrorCode

      public ErrorCode getErrorCode()
      Gets the error code for this exception
      Returns:
      the error code
    • getHttpStatus

      public abstract int getHttpStatus()
      If the SignService Integration Service is used from a REST API, the HTTP status may be useful when reporting errors.
      Returns:
      the HTTP status code that should be used when sending an error response for this exception
    • getCategory

      protected ErrorCode.Category getCategory()
      Override this method if a subclass is tied to a specific error category.
      Returns:
      the error category for this exception