io
This commit is contained in:
8
src/main/kotlin/blitz/ModifyException.kt
Normal file
8
src/main/kotlin/blitz/ModifyException.kt
Normal file
@@ -0,0 +1,8 @@
|
||||
package blitz
|
||||
|
||||
fun <R> modifyException(new: Throwable, block: () -> R): R =
|
||||
try {
|
||||
block()
|
||||
} catch (e: Throwable) {
|
||||
throw new
|
||||
}
|
Reference in New Issue
Block a user