Force the recording of backtraces

This commit is contained in:
Jeremie Dimino 2017-03-10 10:53:34 +00:00
parent 4aec06ee46
commit 3cb0372f8b
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,9 @@ module Set = MoreLabels.Set
external reraise : exn -> _ = "%reraise"
(* To make bug reports usable *)
let () = Printexc.record_backtrace true
let open_in = open_in_bin
let open_out = open_out_bin

View File

@ -88,7 +88,7 @@ let report_error ?(map_fname=fun x->x) ppf exn ~backtrace =
pkg
| Code_error msg ->
let bt = Printexc.raw_backtrace_to_string backtrace in
Format.fprintf ppf "@{<error>Internal error, please report upstream.@}\n\
Format.fprintf ppf "@{<error>Internal error, please report upstream (include the contents of _build/log.@}\n\
Description: %s\n\
Backtrace:\n\
%s" msg bt