ErrorRecovery



The method of recovery when PagingSource returns LoadResult.Error. The error is indicated when PagingDataPresenter.loadStateFlow emits a CombinedLoadStates where one or more of the LoadState is LoadState.Error.

Summary

Enum Values

RETRY

Retry the failed load.

RETURN_CURRENT_SNAPSHOT

Returns a snapshot with any data that has been loaded up till the point of error.

THROW

Rethrow the original Throwable that was caught when loading from the data source.

Public functions

ErrorRecovery
valueOf(value: String)

Returns the enum constant of this type with the specified name.

Cmn
Array<ErrorRecovery>

Returns an array containing the constants of this enum type, in the order they're declared.

Cmn

Public properties

EnumEntries<ErrorRecovery>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Cmn

Enum Values

RETRY

@VisibleForTesting
val ErrorRecovery.RETRYErrorRecovery

Retry the failed load. This does not guarantee a successful load as the data source may still return an error.

RETURN_CURRENT_SNAPSHOT

@VisibleForTesting
val ErrorRecovery.RETURN_CURRENT_SNAPSHOTErrorRecovery

Returns a snapshot with any data that has been loaded up till the point of error.

THROW

@VisibleForTesting
val ErrorRecovery.THROWErrorRecovery

Rethrow the original Throwable that was caught when loading from the data source.

Public functions

valueOf

fun valueOf(value: String): ErrorRecovery

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

fun values(): Array<ErrorRecovery>

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

Public properties

entries

val entriesEnumEntries<ErrorRecovery>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

This method may be used to iterate over the enum entries.