You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/topics/wasm/wasm-js-interop.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -399,7 +399,7 @@ You can use Kotlin `try-catch` expression to catch JavaScript exceptions.
399
399
However, accessing specific details about the thrown value in Kotlin/Wasm isn’t possible by default.
400
400
401
401
You can configure the `JsException` type to include the original error message and stack trace from JavaScript.
402
-
To do so, add the following compiler flag to your `build.gradle.kts` file:
402
+
To do so, add the following compiler option to your `build.gradle.kts` file:
403
403
404
404
```kotlin
405
405
kotlin {
@@ -443,8 +443,8 @@ fun main() {
443
443
}
444
444
```
445
445
446
-
With the `-Xwasm-attach-js-exception`flag enabled, the `JsException` type provides specific details from the JavaScript error.
447
-
Without the flag, `JsException` includes only a generic message stating that an exception was thrown while running JavaScript code.
446
+
With the `-Xwasm-attach-js-exception`compiler option enabled, the `JsException` type provides specific details from the JavaScript error.
447
+
Without enabling this compiler option, `JsException` includes only a generic message stating that an exception was thrown while running JavaScript code.
448
448
449
449
If you try to use a JavaScript `try-catch` expression to catch Kotlin/Wasm exceptions, it looks like a
450
450
generic `WebAssembly.Exception` without directly accessible messages and data.
0 commit comments