Skip to content

Commit

Permalink
adjusting try-catch blocks in jsTest
Browse files Browse the repository at this point in the history
  • Loading branch information
suntrix committed Nov 23, 2021
1 parent 9f614c7 commit 7e7c78e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope
try {
test()
} catch (e: dynamic) {
e.log()
(e as? Throwable)?.log()
throw e
}
}.asDynamic()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope
.promise {
try {
test()
} catch (e: Throwable) {
e.log()
} catch (e: dynamic) {
(e as? Throwable)?.log()
throw e
}
}.asDynamic()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ actual fun runTest(test: suspend () -> Unit) = GlobalScope
.promise {
try {
test()
} catch (e: Throwable) {
e.log()
} catch (e: dynamic) {
(e as? Throwable)?.log()
throw e
}
}.asDynamic()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ actual fun runTest(test: suspend CoroutineScope.() -> Unit) = GlobalScope
.promise {
try {
test()
} catch (e: Throwable) {
e.log()
} catch (e: dynamic) {
(e as? Throwable)?.log()
throw e
}
}.asDynamic()
Expand Down

0 comments on commit 7e7c78e

Please sign in to comment.