# UncapturedErrorCallback

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

*** ** * ** ***


```
fun interface UncapturedErrorCallback
```

<br />

*** ** * ** ***

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/webgpu/UncapturedErrorCallback#onUncapturedError(androidx.webgpu.GPUDevice,kotlin.Int,kotlin.String)(device: https://developer.android.com/reference/kotlin/androidx/webgpu/GPUDevice, type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` A callback function for handling uncaptured errors. |

## Public functions

### onUncapturedError

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

```
fun onUncapturedError(device: GPUDevice, type: Int, message: String): Unit
```

A callback function for handling uncaptured errors.

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