Catch

fun Catch(state: DataModel<*>, isEnabled: Boolean = true, content: @Composable CatchScope.(err: Throwable) -> Unit = { Throw(error = it) })

Catch for a DataModel to be rejected.

Parameters

state

The DataModel to catch.

isEnabled

Whether to catch the error.

content

The content to display when the query is rejected. By default, it throws the error.


fun Catch(state1: DataModel<*>, state2: DataModel<*>, isEnabled: Boolean = true, content: @Composable CatchScope.(err: Throwable) -> Unit = { Throw(error = it) })

Catch for any DataModels to be rejected.

Parameters

state1

The first DataModel to catch.

state2

The second DataModel to catch.

isEnabled

Whether to catch the error.

content

The content to display when the query is rejected. By default, it throws the error.


fun Catch(state1: DataModel<*>, state2: DataModel<*>, state3: DataModel<*>, isEnabled: Boolean = true, content: @Composable CatchScope.(err: Throwable) -> Unit = { Throw(error = it) })

Catch for any DataModels to be rejected.

Parameters

state1

The first DataModel to catch.

state2

The second DataModel to catch.

state3

The third DataModel to catch.

isEnabled

Whether to catch the error.

content

The content to display when the query is rejected. By default, it throws the error.


fun Catch(vararg states: DataModel<*>, isEnabled: Boolean = true, content: @Composable CatchScope.(err: Throwable) -> Unit = { Throw(error = it) })

Catch for any DataModels to be rejected.

Parameters

states

The DataModels to catch.

isEnabled

Whether to catch the error.

content

The content to display when the query is rejected. By default, it throws the error.


fun <T : Throwable> Catch(state: DataModel<*>, filterIsInstance: (err: Throwable) -> T?, isEnabled: Boolean = true, content: @Composable CatchScope.(err: T) -> Unit = { Throw(error = it) })

Catch for a DataModel to be rejected.

Parameters

state

The DataModel to catch.

filterIsInstance

A function to filter the error.

isEnabled

Whether to catch the error.

content

The content to display when the query is rejected. By default, it throws the error.


fun <T : Throwable> Catch(state1: DataModel<*>, state2: DataModel<*>, filterIsInstance: (err: Throwable) -> T?, isEnabled: Boolean = true, content: @Composable CatchScope.(err: T) -> Unit = { Throw(error = it) })

Catch for any DataModels to be rejected.

Parameters

state1

The first DataModel to catch.

state2

The second DataModel to catch.

filterIsInstance

A function to filter the error.

isEnabled

Whether to catch the error.

content

The content to display when the query is rejected. By default, it throws the error.


fun <T : Throwable> Catch(state1: DataModel<*>, state2: DataModel<*>, state3: DataModel<*>, filterIsInstance: (err: Throwable) -> T?, isEnabled: Boolean = true, content: @Composable CatchScope.(err: T) -> Unit = { Throw(error = it) })

Catch for any DataModels to be rejected.

Parameters

state1

The first DataModel to catch.

state2

The second DataModel to catch.

state3

The third DataModel to catch.

filterIsInstance

A function to filter the error.

isEnabled

Whether to catch the error.

content

The content to display when the query is rejected. By default, it throws the error.


fun <T : Throwable> Catch(vararg states: DataModel<*>, filterIsInstance: (err: Throwable) -> T?, isEnabled: Boolean = true, content: @Composable CatchScope.(err: T) -> Unit = { Throw(error = it) })

Catch for any DataModels to be rejected.

Parameters

states

The DataModels to catch.

filterIsInstance

A function to filter the error.

isEnabled

Whether to catch the error.

content

The content to display when the query is rejected. By default, it throws the error.