Android 12 Developer Preview is here! Try it out, and give us your feedback!

CorruptionException

class CorruptionException : IOException
kotlin.Any
   ↳ kotlin.Throwable
   ↳ java.lang.Exception
   ↳ java.io.IOException
   ↳ 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
<init>(message: String, cause: Throwable? = null)

A subclass of IOException that indicates that the file could not be de-serialized due to data format corruption.

Public constructors

<init>

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

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.