reasonml / reason

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
http://reasonml.github.io
MIT License
10.14k stars 430 forks source link

Stack traces in refmt are masked. #649

Open jordwalke opened 8 years ago

jordwalke commented 8 years ago

There's a main try block in refmt_impl.ml that does the following:

  with
  | exn ->
    Location.report_exception Format.err_formatter exn;
    exit 1

``

That is apparently masking our stack traces. I don't know what it's supposed to do or how to prevent it from masking stack traces.
bobzhang commented 8 years ago

this may be useful:

external reraise : exn -> 'a = "%reraise"

it will keep stacktrace

jordwalke commented 8 years ago

Thank you, Bob!

jordwalke commented 8 years ago

(lowpri) To refine this github issue: I think we want to reraise the exception if it's not a parse error, but do what we currently do if it is a parse error.