public class

InstantException

extends RuntimeException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ com.pspdfkit.instant.exceptions.InstantException
Known Direct Subclasses

Class Overview

Thrown when there's an error while communicating with instant server. Suppressing OverrideThrowableToString as we're fine with just using toString here.

Summary

Public Constructors
InstantException(String message, Throwable cause)
Constructs a new instant exception with the specified detail message and cause.
InstantException(InstantErrorCode errorCode, Throwable cause, String message, Object... args)
Constructs a new instant exception with the specified detail message and cause.
InstantException(InstantErrorCode errorCode, String message, 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.
Public Methods
InstantErrorCode getErrorCode()
Gets error code for the source of this exception..
String toString()
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public 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 or null if cause is unknown.

public InstantException (InstantErrorCode errorCode, Throwable cause, String message, 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 or null if cause is unknown.
message The detail message.
args Arguments for the format specifiers in the message.

public InstantException (InstantErrorCode errorCode, String message, 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.

public 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.)

Public Methods

public 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.

public String toString ()