Skip to content

Commit 1cfc1bc

Browse files
koshachyAlejandraPedrozaserras
authored
feat: add What's new in Kotlin 2.1.0 (#4574)
* feat: Guard conditions in when expressions (#4417) * Guard conditions in when expressions This PR adds information about Guard conditions in when expressions and how to use them. * Alejandro's review * chore: adding `is` in a branch Co-authored-by: Alejandro Serrano <trupill@gmail.com> * chore: adding `data` in code line Co-authored-by: Alejandro Serrano <trupill@gmail.com> * Andrey review * Update docs/topics/control-flow.md Co-authored-by: Andrey Polyakov <koshachy@gmail.com> * chore: fix code comments --------- Co-authored-by: Alejandro Serrano <trupill@gmail.com> Co-authored-by: Andrey Polyakov <koshachy@gmail.com> * feat: add What's new in Kotlin 2.1.0 * update: update WN in Kotlin 2.1.0 * fix: rollback style changed * fix: style fixes * update: some doc updates * fix: apply patch * Revert "feat: Guard conditions in when expressions (#4417)" This reverts commit b778f28. * fix: fix the link * fix: deliver fixes * fix: deliver fixes after review * fix: deliver fixes after review --------- Co-authored-by: alejandrapedroza <39709865+AlejandraPedroza@users.noreply.github.com> Co-authored-by: Alejandro Serrano <trupill@gmail.com>
1 parent 4fcaa75 commit 1cfc1bc

File tree

2 files changed

+1568
-3
lines changed

2 files changed

+1568
-3
lines changed

docs/topics/wasm/wasm-js-interop.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ You can use Kotlin `try-catch` expression to catch JavaScript exceptions.
399399
However, accessing specific details about the thrown value in Kotlin/Wasm isn’t possible by default.
400400

401401
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:
403403

404404
```kotlin
405405
kotlin {
@@ -443,8 +443,8 @@ fun main() {
443443
}
444444
```
445445

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.
448448

449449
If you try to use a JavaScript `try-catch` expression to catch Kotlin/Wasm exceptions, it looks like a
450450
generic `WebAssembly.Exception` without directly accessible messages and data.

0 commit comments

Comments
 (0)