Package com.pspdfkit.instant.exceptions
Class InstantException
-
- All Implemented Interfaces:
-
java.io.Serializable
public class InstantException extends RuntimeException
Thrown when there's an error while communicating with Instant Server (PSPDFKit Document Engine). Suppressing OverrideThrowableToString as we're fine with just using toString here.
-
-
Field Summary
Fields Modifier and Type Field Description public final InstantErrorCode
errorCode
public final Integer
underlyingError
-
Constructor Summary
Constructors Constructor Description InstantException(String message, Throwable cause)
Constructs a new instant exception with the specified detail message and cause. InstantException(InstantErrorCode errorCode, Throwable cause, String message, Array<Object> args)
Constructs a new instant exception with the specified detail message and cause. InstantException(InstantErrorCode errorCode, String message, Array<Object> args)
Constructs a new instant exception with the specified detail message and cause. InstantException(InstantErrorCode errorCode, String message, Integer underlyingError)
Constructs a new instant exception with the specified detail message and cause.
-
Method Summary
Modifier and Type Method Description InstantErrorCode
getErrorCode()
Gets error code for the source of this exception.. Integer
getUnderlyingError()
If there is an identifiable subsystem failure, this will hold the original error code. String
toString()
-
-
Constructor Detail
-
InstantException
InstantException(String message, Throwable cause)
Constructs a new instant exception with the specified detail message and cause.- Parameters:
message
- The detail message.cause
- The cause of this exception ornull
if cause is unknown.
-
InstantException
InstantException(InstantErrorCode errorCode, Throwable cause, String message, Array<Object> args)
Constructs a new instant exception with the specified detail message and cause.- Parameters:
errorCode
- The error code of the exception cause.cause
- The cause of this exception ornull
if cause is unknown.message
- The detail message.args
- Arguments for the format specifiers in the message.
-
InstantException
InstantException(InstantErrorCode errorCode, String message, Array<Object> args)
Constructs a new instant exception with the specified detail message and cause.- Parameters:
errorCode
- The error code of the exception cause.message
- The detail message.args
- Arguments for the format specifiers in the message.
-
InstantException
InstantException(InstantErrorCode errorCode, String message, Integer underlyingError)
Constructs a new instant exception with the specified detail message and cause.- Parameters:
errorCode
- The error code of the exception cause.message
- The detail message.underlyingError
- Implementation specific error code that caused this exception (HTTP error code for network errors, SQL error code for database errors etc.
-
-
Method Detail
-
getErrorCode
@NonNull() InstantErrorCode getErrorCode()
Gets error code for the source of this exception..
- Returns:
Error code for the source of this exception or UNKNOWN if not known.
-
getUnderlyingError
@Nullable() Integer getUnderlyingError()
If there is an identifiable subsystem failure, this will hold the original error code.
-
-
-
-