aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toplevel/cerrors.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/toplevel/cerrors.ml b/toplevel/cerrors.ml
index 61c8e4874f..68483f5e24 100644
--- a/toplevel/cerrors.ml
+++ b/toplevel/cerrors.ml
@@ -81,6 +81,10 @@ let rec explain_exn_default_aux anomaly_string report_fn = function
msg
| EvaluatedError (msg,Some reraise) ->
msg ++ explain_exn_default_aux anomaly_string report_fn reraise
+ | Ploc.Exc(loc,exc) ->
+ hov 0 ((if loc = dummy_loc then (mt ())
+ else (str"At location " ++ print_loc loc ++ str":" ++ fnl ()))
+ ++ explain_exn_default_aux anomaly_string report_fn exc)
| reraise ->
hov 0 (anomaly_string () ++ str "Uncaught exception " ++
str (Printexc.to_string reraise) ++ report_fn ())