-
Notifications
You must be signed in to change notification settings - Fork 1.9k
propagateExceptionFinalResort-nodejs-reportError #4511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
@turansky PTAL! |
LGTM! |
|
// https://github.com/JetBrains/kotlin-wrappers/blob/master/kotlin-browser/src/webMain/generated/web/errors/reportError.kt | ||
if (globalThis.reportError != null) { | ||
// Modern browsers, Deno, Bun, etc. | ||
globalThis.reportError(jsException) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand, we can only rely on reportError
once your change in kotlin-wrappers is commited to master? So this PR is dependant on your merge.
# Change log for kotlinx.coroutines | ||
|
||
## Version 1.10.3 | ||
* Unhandled exceptions in Kotlin coroutines are now re-thrown into the environment instead of being logged into the console on the `js` and `wasmJS` targets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think mentioning that it still only prints to console in browser is not needed, since it, in fact, now throws in browser, only the browser chooses to log it into console.
Also, the logged exception message in browser may change, as it will now be formatted by the browser's preference, rather than by us.
# Change log for kotlinx.coroutines | ||
|
||
## Version 1.10.3 | ||
* Unhandled exceptions in Kotlin coroutines are now re-thrown into the environment instead of being logged into the console on the `js` and `wasmJS` targets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be annotated as Breaking changes / Behavior change
# Change log for kotlinx.coroutines | ||
|
||
## Version 1.10.3 | ||
* Unhandled exceptions in Kotlin coroutines are now re-thrown into the environment instead of being logged into the console on the `js` and `wasmJS` targets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only update changelogs as part of the release procedure: https://github.com/Kotlin/kotlinx.coroutines/blob/master/RELEASE.md This way, several changes can be combined and described in bulk or undo one another.
|
||
internal actual fun propagateExceptionFinalResort(exception: Throwable) { | ||
val jsException = exception.toJsException() | ||
// https://github.com/JetBrains/kotlin-wrappers/blob/master/kotlin-browser/src/webMain/generated/web/errors/reportError.kt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using commit hashes instead of branch names can make such links more reliable. I wanted to say "this link could start returning 404 tomorrow", but in fact, it returns 404 for me today!
#4451