# QuicException


```
public abstract class QuicException extends NetworkException
```

<br />

|---|---|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) ||||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) |||||
|   |   | ↳ | [java.io.IOException](https://developer.android.com/reference/java/io/IOException.html) ||||
|   |   |   | ↳ | [org.chromium.net.CronetException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CronetException) |||
|   |   |   |   | ↳ | [org.chromium.net.NetworkException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException) ||
|   |   |   |   |   | ↳ | [org.chromium.net.QuicException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/QuicException) |

*** ** * ** ***

Subclass of `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException` which contains a detailed [QUIC](https://www.chromium.org/quic) error code from [QuicErrorCode](https://cs.chromium.org/search/?q=symbol:%5CbQuicErrorCode%5Cb). An instance of `QuicException` is passed to `onFailed` callbacks when the error code is `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_QUIC_PROTOCOL_FAILED()`.

## Summary

| ### Protected constructors |
|---|
| `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/QuicException#QuicException(java.lang.String,java.lang.Throwable)(https://developer.android.com/reference/java/lang/String.html message, https://developer.android.com/reference/java/lang/Throwable.html cause)` Constructs an exception that is caused by a QUIC protocol error. |

| ### Public methods |
|---|---|
| `int` | `@https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/ConnectionCloseSource https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/QuicException#getConnectionCloseSource()()` Returns the side responsible for terminating the QUIC connection. |
| `abstract int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/QuicException#getQuicDetailedErrorCode()()` Returns the [QUIC](https://www.chromium.org/quic) error code, which is a value from [QuicErrorCode](https://cs.chromium.org/search/?q=symbol:%5CbQuicErrorCode%5Cb). |

| ### Inherited Constants |
|---|
| From [org.chromium.net.NetworkException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException) |---|---| | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_ADDRESS_UNREACHABLE() = 9` Error code indicating the IP address being contacted is unreachable, meaning there is no route to the specified host or network. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_CONNECTION_CLOSED() = 5` Error code indicating the connection was closed unexpectedly. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_CONNECTION_REFUSED() = 7` Error code indicating the connection attempt was refused. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_CONNECTION_RESET() = 8` Error code indicating the connection was unexpectedly reset. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_CONNECTION_TIMED_OUT() = 6` Error code indicating the connection attempt timed out. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_HOSTNAME_NOT_RESOLVED() = 1` Error code indicating the host being sent the request could not be resolved to an IP address. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_INTERNET_DISCONNECTED() = 2` Error code indicating the device was not connected to any network. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_NETWORK_CHANGED() = 3` Error code indicating that as the request was processed the network configuration changed. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_OTHER() = 11` Error code indicating another type of error was encountered. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_QUIC_PROTOCOL_FAILED() = 10` Error code indicating an error related to the [QUIC](https://www.chromium.org/quic) protocol. | | `static final int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_TIMED_OUT() = 4` Error code indicating a timeout expired. | |

| ### Inherited methods |
|---|
| From [org.chromium.net.NetworkException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException) |---|---| | `abstract int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#getCronetInternalErrorCode()()` Returns a Cronet internal error code. | | `abstract int` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#getErrorCode()()` Returns error code, one of `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#ERROR_HOSTNAME_NOT_RESOLVED()`. | | `abstract boolean` | `https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/NetworkException#immediatelyRetryable()()` Returns `true` if retrying this request right away might succeed, `false` otherwise. | |
| From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |---|---| | `synchronized final void` | `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html p)` | | `synchronized https://developer.android.com/reference/java/lang/Throwable.html` | `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` | | `synchronized https://developer.android.com/reference/java/lang/Throwable.html` | `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` | | `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage()()` | | `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/java/lang/Throwable.html#getMessage()()` | | `StackTraceElement[]` | `https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` | | `synchronized final Throwable[]` | `https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` | | `synchronized https://developer.android.com/reference/java/lang/Throwable.html` | `https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html p)` | | `void` | `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` | | `void` | `https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])(StackTraceElement[] p)` | | `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/java/lang/Throwable.html#toString()()` | |

## Protected constructors

### QuicException

```
protected QuicException(String message, Throwable cause)
```

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html message` | explanation of failure. |
| `https://developer.android.com/reference/java/lang/Throwable.html cause` | the cause (which is saved for later retrieval by the `https://developer.android.com/reference/java/lang/Throwable.html#getCause()` method). A null value is permitted, and indicates that the cause is nonexistent or unknown. |

## Public methods

### getConnectionCloseSource

```
@ConnectionCloseSource
public int getConnectionCloseSource()
```

Returns the side responsible for terminating the QUIC connection.

### getQuicDetailedErrorCode

```
public abstract int getQuicDetailedErrorCode()
```

Returns the [QUIC](https://www.chromium.org/quic) error code, which is a value from [QuicErrorCode](https://cs.chromium.org/search/?q=symbol:%5CbQuicErrorCode%5Cb).