(***********************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* print_unhandled_exception e | h::s' -> try h e with | Unhandled -> print_gen s' e | e' -> print_gen s' e' let print e = print_gen !handle_stack e (*** Predefined handlers ***) let where s = if !Flags.debug then (str"in " ++ str s ++ str":" ++ spc ()) else (mt ()) let _ = register_handler begin function | Util.UserError(s,pps) -> hov 0 (str "Error: " ++ where s ++ pps) | Util.Anomaly (s,pps) -> hov 0 (anomaly_string () ++ where s ++ pps ++ report_fn ()) | _ -> raise Unhandled end