-
Notifications
You must be signed in to change notification settings - Fork 30
Add panic function #72
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
Conversation
I typically don't use the exn functions, but is it problematic that we're changing what exn a bunch of functions is raising? I'm thinking about the case when people are actually relying on catching them. Edit: oops, accidentally fat finger closed the PR... |
It should probably be noted as a breaking change, but these are all functions that have non-exception-raising alternatives. It doesn't really make sense to catch these exceptions, since you should then use the alternative non-exception-raising function instead (that definitely doesn't mean that people aren't still using it though). |
So, what about splitting this up, first adding the |
refactor(error): less magic needed Co-authored-by: Christoph Knittel <[email protected]> docs(error): panic fixes Co-authored-by: Christoph Knittel <[email protected]> docs(error): ReScript, not OCaml
Done. Internal use split out to #79 |
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.
Good stuff! @cknitt ?
Co-authored-by: Christoph Knittel <[email protected]>
Thanks @glennsl ! |
panic
is likefailwith
but raises a native JavaScript exception that gives a better stack trace and in-browser debugging experience.