# CorruptionException

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

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  class CorruptionException : IOException
  ```

|---|---|---|---|---|
| [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) ||||
|   | ↳ | [kotlin.Exception](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-exception/index.html) |||
|   |   | ↳ | [androidx.datastore.core.IOException](https://developer.android.com/reference/kotlin/androidx/datastore/core/IOException) ||
|   |   |   | ↳ | [androidx.datastore.core.CorruptionException](https://developer.android.com/reference/kotlin/androidx/datastore/core/CorruptionException) |

*** ** * ** ***

A subclass of IOException that indicates that the file could not be de-serialized due to data format corruption. This exception should not be thrown when the IOException is due to a transient IO issue or permissions issue.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/datastore/core/CorruptionException#CorruptionException(kotlin.String,kotlin.Throwable)(message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html?)` | Cmn |

| ### Inherited functions |
|---|
| From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) |---|---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | `@https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.experimental/-experimental-native-api/index.html https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-stack-trace.html()` | Cmn | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` | Cmn | | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/to-string.html()` | Cmn | |

| ### Inherited properties |
|---|
| From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) |---|---|---| | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html?` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/cause.html` | Cmn | | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/message.html` | Cmn | |

## Public constructors

### CorruptionException

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/datastore#1.0.0)

```
CorruptionException(message: String, cause: Throwable? = null)
```