setError

fun <T : UiState> MutableState<T>.setError(error: Exception?, type: ErrorType = ErrorType.CRITICAL)

Updates the error state for any UiState implementation.

Parameters

T

The concrete UiState type.

error

The new error.