aboutsummaryrefslogtreecommitdiff
path: root/lib/pp.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pp.ml')
-rw-r--r--lib/pp.ml6
1 files changed, 4 insertions, 2 deletions
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 *)