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

*** ** * ** ***


```
public class WebGpuRuntimeException extends Exception
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) ||
|   |   | ↳ | [androidx.webgpu.WebGpuRuntimeException](https://developer.android.com/reference/androidx/webgpu/WebGpuRuntimeException) |

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

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

*** ** * ** ***

Base class for exceptions that can happen at runtime.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/webgpu/WebGpuRuntimeException#WebGpuRuntimeException(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message)` |

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/WebGpuRuntimeException` | `https://developer.android.com/reference/androidx/webgpu/WebGpuRuntimeException#create(kotlin.Int,kotlin.String)(int type, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message)` Create the exception for the appropriate error type. |

### Inherited methods

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `final void` `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html exception)` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` `https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `@https://developer.android.com/reference/androidx/annotation/RecentlyNullable
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()()` `@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull Throwable[]` `@https://developer.android.com/reference/androidx/annotation/RecentlyNonNull
https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` `@https://developer.android.com/reference/androidx/annotation/NonNull 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/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Throwable.html cause)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintStream)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintStream.html s)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace(java.io.PrintWriter)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/io/PrintWriter.html s)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])(@https://developer.android.com/reference/androidx/annotation/NonNull StackTraceElement[] stackTrace)`

## Public constructors

### WebGpuRuntimeException

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

```
public WebGpuRuntimeException(@NonNull String message)
```

## Public methods

### create

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

```
public static final @NonNull WebGpuRuntimeException create(int type, @NonNull String message)
```

Create the exception for the appropriate error type.

| Parameters |
|---|---|
| `int type` | The `https://developer.android.com/reference/androidx/webgpu/ErrorType`. Value is one of the following: - `1` - `2` - `3` - `4` - `5` <br /> |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message` | A human-readable message describing the error. |