All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.arrow.throwIfFatal.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha.3
Show newest version
package arrow

import kotlin.coroutines.cancellation.CancellationException

@PublishedApi
internal actual fun Throwable.throwIfFatal(): Throwable =
  when(this) {
    is VirtualMachineError, is ThreadDeath, is InterruptedException, is LinkageError, is CancellationException -> throw this
    else -> this
  }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy