ocsigen / js_of_ocaml

Compiler from OCaml to Javascript.
http://ocsigen.org/js_of_ocaml/
Other
943 stars 185 forks source link

Runtime: abort instead of exit on unimplemented js primitives #1590

Closed hhugo closed 3 months ago

hhugo commented 3 months ago

fix #677

dbuenzli commented 3 months ago

I think it would be better to use caml_fatal_error and eschew the fprintf. This would hook into the support provided by the runtime system (notably you can easily define a caml_fatal_error_hook to do what you want with the error reporting). See the discussions here.

hhugo commented 3 months ago

Thanks, changed in https://github.com/ocsigen/js_of_ocaml/commit/28743eeb8a6428e9d82f4051512b9fb708e5af29

dbuenzli commented 3 months ago

Thank you!