# WebGpuRuntimeException

Artifact: [androidx.webgpu:webgpu](https://developer.android.com/jetpack/androidx/releases/webgpu) [View Source](https://cs.android.com/search?q=file:androidx/webgpu/Exceptions.kt+class:androidx.webgpu.WebGpuRuntimeException) Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

*** ** * ** ***


```
open class WebGpuRuntimeException : Exception
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||
|   |   | ↳ | [androidx.webgpu.WebGpuRuntimeException](https://developer.android.com/reference/kotlin/androidx/webgpu/WebGpuRuntimeException) |

Known direct subclasses [InternalException](https://developer.android.com/reference/kotlin/androidx/webgpu/InternalException), [OutOfMemoryException](https://developer.android.com/reference/kotlin/androidx/webgpu/OutOfMemoryException), [UnknownException](https://developer.android.com/reference/kotlin/androidx/webgpu/UnknownException), [ValidationException](https://developer.android.com/reference/kotlin/androidx/webgpu/ValidationException)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/InternalException` | Exception for Internal type errors. |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/OutOfMemoryException` | Exception for OutOfMemory type errors. |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/UnknownException` | Exception for Unknown type errors. |
| `https://developer.android.com/reference/kotlin/androidx/webgpu/ValidationException` | Exception for Validation type errors. |

*** ** * ** ***

Base class for exceptions that can happen at runtime.

## Summary

| ### Public companion functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/WebGpuRuntimeException` | `https://developer.android.com/reference/kotlin/androidx/webgpu/WebGpuRuntimeException#create(kotlin.Int,kotlin.String)(type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Create the exception for the appropriate error type. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/webgpu/WebGpuRuntimeException#WebGpuRuntimeException(kotlin.String)(message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` |

### Inherited functions

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintStream.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html(s: https://developer.android.com/reference/java/io/PrintWriter.html)`

### Inherited properties

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/cause.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/localized-message.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/message.html` `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/stack-trace.html` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html>` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/suppressed.html`

## Public companion functions

### create

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
fun create(type: Int, message: String): WebGpuRuntimeException
```

Create the exception for the appropriate error type.

| Parameters |
|---|---|
| `type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/webgpu/ErrorType`. Value is one of the following: - `1` - `2` - `3` - `4` - `5` <br /> |
| `message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | A human-readable message describing the error. |

## Public constructors

### WebGpuRuntimeException

Added in [1.0.0-alpha06](https://developer.android.com/jetpack/androidx/releases/webgpu#1.0.0-alpha06)

```
WebGpuRuntimeException(message: String)
```