We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b48761 commit 9561681Copy full SHA for 9561681
kotlinx-coroutines-core/wasmJs/src/Promise.kt
@@ -75,6 +75,6 @@ public fun <T> Promise<JsAny?>.asDeferred(): Deferred<T> {
75
public suspend fun <T> Promise<JsAny?>.await(): T = suspendCancellableCoroutine { cont: CancellableContinuation<T> ->
76
this@await.then(
77
onFulfilled = { cont.resume(it as T); null },
78
- onRejected = { cont.resumeWithException(it.toThrowableOrNull() ?: Exception("Non-Kotlin exception $it")); null }
+ onRejected = { cont.resumeWithException(it.toThrowableOrNull() ?: error("Unexpected non-Kotlin exception $it")); null }
79
)
80
}
0 commit comments