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

*** ** * ** ***


```
public fun interface UncapturedErrorCallback
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/webgpu/UncapturedErrorCallback#onUncapturedError(androidx.webgpu.GPUDevice,kotlin.Int,kotlin.String)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUDevice device, int type, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message )` A callback function for handling uncaptured errors. |

## Public methods

### onUncapturedError

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

```
abstract void onUncapturedError(
    @NonNull GPUDevice device,
    int type,
    @NonNull String message
)
```

A callback function for handling uncaptured errors.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/webgpu/GPUDevice device` | The device on which the error occurred. |
| `int type` | The type of the error. 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` | The error message. |