wrapIOException

@JvmName(name = "wrapIO")
fun Throwable.wrapIOException(): IOException(source)

Ensures that the throwable is an instance of IOException. If it is not, it will encase it in one.


@JvmName(name = "wrapIO")
fun Throwable.wrapIOException(lazyMessage: () -> String): IOException(source)

Ensures that the throwable is an instance of IOException. If it is not, it will encase it in one with the provided lazyMessage.