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

*** ** * ** ***


```
public final class CorruptionException extends IOException
```

<br />

|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) ||||
|   | ↳ | [kotlin.Exception](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-exception/index.html) |||
|   |   | ↳ | [androidx.datastore.core.IOException](https://developer.android.com/reference/androidx/datastore/core/IOException) ||
|   |   |   | ↳ | [androidx.datastore.core.CorruptionException](https://developer.android.com/reference/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/androidx/datastore/core/CorruptionException#CorruptionException(kotlin.String,kotlin.Throwable)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html message, https://developer.android.com/reference/java/lang/Throwable.html cause)` |

### Inherited methods

From [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html) `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#getMessage()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull String[]` `@https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.experimental/-experimental-native-api/index.html
https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `final void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#toString()()`

## Public constructors

### CorruptionException

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

```
public CorruptionException(@NonNull String message, Throwable cause)
```