QuicException


abstract class QuicException : NetworkException

Subclass of NetworkException which contains a detailed QUIC error code from QuicErrorCode. An instance of QuicException is passed to onFailed callbacks when the error code is NetworkException.ERROR_QUIC_PROTOCOL_FAILED.

Summary

Inherited constants
Int ERROR_ADDRESS_UNREACHABLE

Error code indicating the IP address being contacted is unreachable, meaning there is no route to the specified host or network.

Int ERROR_CONNECTION_CLOSED

Error code indicating the connection was closed unexpectedly.

Int ERROR_CONNECTION_REFUSED

Error code indicating the connection attempt was refused.

Int ERROR_CONNECTION_RESET

Error code indicating the connection was unexpectedly reset.

Int ERROR_CONNECTION_TIMED_OUT

Error code indicating the connection attempt timed out.

Int ERROR_HOSTNAME_NOT_RESOLVED

Error code indicating the host being sent the request could not be resolved to an IP address.

Int ERROR_INTERNET_DISCONNECTED

Error code indicating the device was not connected to any network.

Int ERROR_NETWORK_CHANGED

Error code indicating that as the request was processed the network configuration changed. When getErrorCode returns this code, this exception may be cast to QuicException for more information if QUIC protocol is used.

Int ERROR_OTHER

Error code indicating another type of error was encountered.

Int ERROR_QUIC_PROTOCOL_FAILED

Error code indicating an error related to the QUIC protocol. When getErrorCode returns this code, this exception can be cast to QuicException for more information.

Int ERROR_TIMED_OUT

Error code indicating a timeout expired. Timeouts expiring while attempting to connect will be reported as the more specific ERROR_CONNECTION_TIMED_OUT.

Protected constructors
QuicException(message: String?, cause: Throwable?)

Constructs an exception that is caused by a QUIC protocol error.

Inherited functions
Int getErrorCode()

Returns error code, one of ERROR_*.

Boolean isImmediatelyRetryable()

Returns true if retrying this request right away might succeed, false otherwise. For example returns true when getErrorCode returns ERROR_NETWORK_CHANGED because trying the request might succeed using the new network configuration, but false when getErrorCode() returns ERROR_INTERNET_DISCONNECTED because retrying the request right away will encounter the same failure (instead retrying should be delayed until device regains network connectivity).

Protected constructors

QuicException

protected QuicException(
    message: String?,
    cause: Throwable?)

Constructs an exception that is caused by a QUIC protocol error.

Parameters
message String?: explanation of failure. This value may be null.
cause Throwable?: the cause (which is saved for later retrieval by the getCause() method). A null value is permitted, and indicates that the cause is nonexistent or unknown.