Skip to content

Commit 543d663

Browse files
ejgallegohhugo
authored andcommitted
[compiler] Print backtraces on Failure too.
We keep the case as to not to disturbe the printing, but not sure it is worth it.
1 parent bd764f9 commit 543d663

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/bin-js_of_ocaml/js_of_ocaml.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ let () =
109109
comp;
110110
exit 1
111111
| Failure s ->
112+
let backtrace = Printexc.get_backtrace () in
112113
Format.eprintf "%s: Error: %s@." Sys.argv.(0) s;
114+
prerr_string backtrace;
113115
exit 1
114116
| exc ->
115117
let backtrace = Printexc.get_backtrace () in

0 commit comments

Comments
 (0)