diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2014-03-18 19:00:40 +0100 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2014-03-18 19:42:07 +0100 |
commit | 0ce28d751c6c49068288547cd084d4c81f0d5b20 (patch) | |
tree | 37a8f68c28ad85b36e644b7fd9cc1db1684200bc /checker/checker.ml | |
parent | 410c088d3cb9f0e3fdb5c01cb036b95aae84a6c2 (diff) |
Printing backtraces in coqchk while in debug mode.
Diffstat (limited to 'checker/checker.ml')
-rw-r--r-- | checker/checker.ml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/checker/checker.ml b/checker/checker.ml index 1bdd0f0e2..abf3704b4 100644 --- a/checker/checker.ml +++ b/checker/checker.ml @@ -358,6 +358,7 @@ let init_with_argv argv = Sys.catch_break false; (* Ctrl-C is fatal during the initialisation *) try parse_args argv; + if !Flags.debug then Printexc.record_backtrace true; Envars.set_coqlib ~fail:Errors.error; if_verbose print_header (); init_load_path (); @@ -373,6 +374,7 @@ let run () = compile_files (); flush_all() with e -> + if !Flags.debug then Printexc.print_backtrace stderr; fatal_error (explain_exn e) let start () = init(); run(); Check_stat.stats(); exit 0 |