aboutsummaryrefslogtreecommitdiff
path: root/lib/cErrors.ml
diff options
context:
space:
mode:
authorGaëtan Gilbert2021-01-28 16:36:07 +0100
committerGaëtan Gilbert2021-02-23 23:42:03 +0100
commit264aba2484312a2172cd36dd9b89ed66e4f38864 (patch)
tree9a56ad01b8070b168ac4a5a504632bbc0262a657 /lib/cErrors.ml
parent1c80a79ae2824027edeea2439bf7e53298724be8 (diff)
Print anomaly labels regardless of -debug, and never print user_err labels
Diffstat (limited to 'lib/cErrors.ml')
-rw-r--r--lib/cErrors.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/cErrors.ml b/lib/cErrors.ml
index 760c07783b..1baedb64c9 100644
--- a/lib/cErrors.ml
+++ b/lib/cErrors.ml
@@ -30,6 +30,7 @@ let anomaly ?loc ?info ?label pp =
let info = Option.cata (Loc.add_loc info) info loc in
Exninfo.iraise (Anomaly (label, pp), info)
+(* TODO remove the option *)
exception UserError of string option * Pp.t (* User errors *)
let user_err ?loc ?info ?hdr strm =
@@ -46,7 +47,7 @@ exception Timeout = Control.Timeout
let where = function
| None -> mt ()
| Some s ->
- if !Flags.debug then str "in " ++ str s ++ str ":" ++ spc () else mt ()
+ str "in " ++ str s ++ str ":" ++ spc ()
let raw_anomaly e = match e with
| Anomaly (s, pps) ->
@@ -133,7 +134,7 @@ let print_no_report e = iprint_no_report (e, Exninfo.info e)
let _ = register_handler begin function
| UserError(s, pps) ->
- Some (where s ++ pps)
+ Some pps
| _ -> None
end