aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/cErrors.mli
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2016-08-19 02:35:47 +0200
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2016-08-19 02:46:38 +0200
commitfc579fdc83b751a44a18d2373e86ab38806e7306 (patch)
treeb325c2ff65c505ad62ac7b3fce6bce28633a60f0 /lib/cErrors.mli
parent543ee0c7ad43874c577416af9f2e5a94d7d1e4d3 (diff)
Make the user_err header an optional parameter.
Suggested by @ppedrot
Diffstat (limited to 'lib/cErrors.mli')
-rw-r--r--lib/cErrors.mli10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/cErrors.mli b/lib/cErrors.mli
index ad17be393..5cffc725d 100644
--- a/lib/cErrors.mli
+++ b/lib/cErrors.mli
@@ -33,11 +33,13 @@ 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 -> string -> std_ppcmds -> 'a
-(** Main error raising primitive. [user_err ?loc c pp] signals an
- error [pp] in component [c], with optional location [loc] *)
+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
(** [error s] just calls [user_error "_" (str s)] *)