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
,PdfAConsistencyCheckException
,PdfContainsAcroformException
,PdfContainsEncryptionDictionaryException
,PdfSignaturePageFullException
,SignServiceIntegrationCategoryException
Base class for Sign Service Integration exceptions.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SignServiceIntegrationException
(ErrorCode.Code code, String message) Constructor.protected
SignServiceIntegrationException
(ErrorCode.Code code, String message, Throwable cause) Constructor.SignServiceIntegrationException
(ErrorCode errorCode, String message) Constructor.SignServiceIntegrationException
(ErrorCode errorCode, String message, Throwable cause) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected ErrorCode.Category
Override this method if a subclass is tied to a specific error category.Gets the error code for this exceptionabstract int
If the SignService Integration Service is used from a REST API, the HTTP status may be useful when reporting errors.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SignServiceIntegrationException
Constructor.- Parameters:
errorCode
- the error codemessage
- the error message
-
SignServiceIntegrationException
Constructor.- Parameters:
errorCode
- the error codemessage
- the error messagecause
- the cause of the error
-
SignServiceIntegrationException
Constructor.May only be used if the subclass overrides
getCategory()
.- Parameters:
code
- the error code (within the given category)message
- the error message
-
SignServiceIntegrationException
Constructor.May only be used if the subclass overrides
getCategory()
.- Parameters:
code
- the error code (within the given category)message
- the error messagecause
- the cause of the error
-
-
Method Details
-
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
Override this method if a subclass is tied to a specific error category.- Returns:
- the error category for this exception
-