From 0892990d7bbeb770de458a3b4ef2ffe34a1b11e3 Mon Sep 17 00:00:00 2001 From: ppedrot Date: Mon, 28 Jan 2013 21:06:02 +0000 Subject: Actually adding backtrace handling. I hope I did not forget some [with] clauses. Otherwise, some stack frame will be missing from the debug. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16167 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/pp.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/pp.ml') diff --git a/lib/pp.ml b/lib/pp.ml index b899ef8231..b9dc05edff 100644 --- a/lib/pp.ml +++ b/lib/pp.ml @@ -262,8 +262,10 @@ let pp_dirs ft = fun (dirstream : _ ppdirs) -> try Stream.iter pp_dir dirstream; com_brk ft - with - | e -> Format.pp_print_flush ft () ; raise e + with e -> + let e = Backtrace.push_exn e in + let () = Format.pp_print_flush ft () in + raise e (* pretty print on stdout and stderr *) -- cgit v1.2.3