# QuicException


```
abstract class QuicException : NetworkException
```

<br />

|---|---|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.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/kotlin/org/chromium/net/CronetException) |||
|   |   |   |   | ↳ | [org.chromium.net.NetworkException](https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException) ||
|   |   |   |   |   | ↳ | [org.chromium.net.QuicException](https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/QuicException) |

*** ** * ** ***

Subclass of `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/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/kotlin/org/chromium/net/NetworkException#ERROR_QUIC_PROTOCOL_FAILED()`.

## Summary

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

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `@https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/ConnectionCloseSource https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/QuicException#getConnectionCloseSource()()` Returns the side responsible for terminating the QUIC connection. |
| `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/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/kotlin/org/chromium/net/NetworkException) |---|---| | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/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. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_CONNECTION_CLOSED() = 5` Error code indicating the connection was closed unexpectedly. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_CONNECTION_REFUSED() = 7` Error code indicating the connection attempt was refused. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_CONNECTION_RESET() = 8` Error code indicating the connection was unexpectedly reset. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_CONNECTION_TIMED_OUT() = 6` Error code indicating the connection attempt timed out. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/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. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_INTERNET_DISCONNECTED() = 2` Error code indicating the device was not connected to any network. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_NETWORK_CHANGED() = 3` Error code indicating that as the request was processed the network configuration changed. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_OTHER() = 11` Error code indicating another type of error was encountered. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_QUIC_PROTOCOL_FAILED() = 10` Error code indicating an error related to the [QUIC](https://www.chromium.org/quic) protocol. | | `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_TIMED_OUT() = 4` Error code indicating a timeout expired. | |

| ### Inherited functions |
|---|
| From [org.chromium.net.NetworkException](https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException) |---|---| | `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#getCronetInternalErrorCode()()` Returns a Cronet internal error code. | | `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#getErrorCode()()` Returns error code, one of `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/org/chromium/net/NetworkException#ERROR_HOSTNAME_NOT_RESOLVED()`. | | `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/develop/connectivity/cronet/reference/kotlin/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 https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/add-suppressed.html(p: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!)` | | `synchronized https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/fill-in-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-cause.html()` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-localized-message.html()` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-message.html()` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!>!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/get-suppressed.html()` | | `synchronized https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/init-cause.html(p: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!)` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/print-stack-trace.html()` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/set-stack-trace.html(p: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!)` | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/to-string.html()` | |

## Protected constructors

### QuicException

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

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

| Parameters |
|---|---|
| `message: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!` | explanation of failure. |
| `cause: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html!` | 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 functions

### getConnectionCloseSource

```
@ConnectionCloseSource
fun getConnectionCloseSource(): Int
```

Returns the side responsible for terminating the QUIC connection.

### getQuicDetailedErrorCode

```
abstract fun getQuicDetailedErrorCode(): Int
```

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