# CameraControl.OperationCanceledException

Artifact: [androidx.camera:camera-core](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/core/CameraControl.java+class:androidx.camera.core.CameraControl.OperationCanceledException) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/camera#1.0.0)

*** ** * ** ***


```
public final class CameraControl.OperationCanceledException 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.camera.core.CameraControl.OperationCanceledException](https://developer.android.com/reference/androidx/camera/core/CameraControl.OperationCanceledException) |

*** ** * ** ***

An exception representing a failure that the operation is canceled which might be caused by a new value is set or camera is closed.

This is different from `https://developer.android.com/reference/java/util/concurrent/CancellationException.html`. While `https://developer.android.com/reference/java/util/concurrent/CancellationException.html` means the `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` was cancelled by `https://developer.android.com/reference/java/util/concurrent/Future.html#cancel(boolean)`, `https://developer.android.com/reference/androidx/camera/core/CameraControl.OperationCanceledException` occurs when there is something wrong inside CameraControl and it has to cancel the operation.

## Summary

### Inherited methods

From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) `synchronized final void` `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html exception)` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` `https://developer.android.com/reference/java/lang/String.html` `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()()` `StackTraceElement[]` `https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `synchronized final Throwable[]` `https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` `synchronized 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/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#setStackTrace(java.lang.StackTraceElement[])(StackTraceElement[] stackTrace)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#toString()()`