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

*** ** * ** ***

<br />

```
class CameraControl.OperationCanceledException : 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.camera.core.CameraControl.OperationCanceledException](https://developer.android.com/reference/kotlin/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/kotlin/androidx/camera/core/CameraControl.OperationCanceledException` occurs when there is something wrong inside CameraControl and it has to cancel the operation.

## Summary

### Inherited functions

From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) `synchronized 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!)` `synchronized 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()` `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-cause.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-localized-message.html()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-message.html()` `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/get-stack-trace.html()` `synchronized 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/get-suppressed.html()` `synchronized 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/set-stack-trace.html(stackTrace: 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/-string/index.html!` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/to-string.html()`