Add panic function#72
Add panic function#72zth merged 5 commits intorescript-lang:mainrescript-lang/rescript-core:mainfrom
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 <christoph@knittel.cc> docs(error): panic fixes Co-authored-by: Christoph Knittel <christoph@knittel.cc> docs(error): ReScript, not OCaml
Done. Internal use split out to #79 |
Co-authored-by: Christoph Knittel <christoph@knittel.cc>
|
Thanks @glennsl ! |
panicis likefailwithbut raises a native JavaScript exception that gives a better stack trace and in-browser debugging experience.