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
{{ message }}
Repository navigation
v12-alpha: The raise call started recreating exn, which breaks try/catch #6929
Since it accepts the exn type, I expect it to simply generate throw exn instead of recreating an exception instance, which might break on exn having a Js error.
That's not the point. How we throw an error doesn't matter since it might come from an unexpected runtime exception. It still shouldn't break in the case. If the code is in Js_dump, I can probably fix it myself.
Activity
aspeddro commentedon Aug 3, 2024
I think we can change
Js.Exn.raiseErrorfunction to:Playground
aspeddro commentedon Aug 3, 2024
There is no idiomatic way to throw other errors like
EvalError. In fact, there never was.aspeddro commentedon Aug 4, 2024
Something we can support is exception name as error name.
compile to:
DZakh commentedon Aug 4, 2024
That's not the point. How we throw an error doesn't matter since it might come from an unexpected runtime exception. It still shouldn't break in the case. If the code is in Js_dump, I can probably fix it myself.
DZakh commentedon Aug 4, 2024
This is how I see the solution for the issue #6933
DZakh commentedon Aug 4, 2024
I can implement it myself during the week
cknitt commentedon May 11, 2025
This was fixed in #7016 by reverting #6611.
Closing this issue, as there is already a separate one for a custom ReScriptError class: #6972