aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/cErrors.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cErrors.mli')
-rw-r--r--lib/cErrors.mli14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/cErrors.mli b/lib/cErrors.mli
index e5dad93fd..5cffc725d 100644
--- a/lib/cErrors.mli
+++ b/lib/cErrors.mli
@@ -33,15 +33,21 @@ val is_anomaly : exn -> bool
This is mostly provided for compatibility. Please avoid doing specific
tricks with anomalies thanks to it. See rather [noncritical] below. *)
-exception UserError of string * std_ppcmds
+exception UserError of string option * std_ppcmds
+(** Main error signaling exception. It carries a header plus a pretty printing
+ doc *)
+
+val user_err : ?loc:Loc.t -> ?hdr:string -> std_ppcmds -> 'a
+(** Main error raising primitive. [user_err ?loc ?hdr pp] signals an
+ error [pp] with optional header and location [hdr] [loc] *)
+
val error : string -> 'a
-val errorlabstrm : string -> std_ppcmds -> 'a
-val user_err_loc : Loc.t * string * std_ppcmds -> 'a
+(** [error s] just calls [user_error "_" (str s)] *)
exception AlreadyDeclared of std_ppcmds
val alreadydeclared : std_ppcmds -> 'a
-val invalid_arg_loc : Loc.t * string -> 'a
+val invalid_arg : ?loc:Loc.t -> string -> 'a
(** [todo] is for running of an incomplete code its implementation is
"do nothing" (or print a message), but this function should not be