Line | |
---|
1 | (** This module provides a uniform way of reporting (located) error message. *) |
---|
2 | |
---|
3 | (** [exit_if_error ()] forces the program to stop if an error is encountered. |
---|
4 | (This is the default behavior.) *) |
---|
5 | val exit_if_error: unit -> unit |
---|
6 | |
---|
7 | (** [resume_if_error ()] makes the program throw the exception {!Error} |
---|
8 | if an error is encountered. *) |
---|
9 | val resume_if_error: unit -> unit |
---|
10 | |
---|
11 | exception Error of Position.t list * string |
---|
12 | |
---|
13 | (** [print_error positions msg] formats an error message. *) |
---|
14 | val print_error : Position.t list -> string -> string |
---|
15 | |
---|
16 | (** [error k p msg] prints [msg] with [k] as a message prefix and stops |
---|
17 | the program. *) |
---|
18 | val error : string -> Position.t -> string -> 'a |
---|
19 | |
---|
20 | (** [error2 k p1 p2 msg] prints two positions instead of one. *) |
---|
21 | val error2 : string -> Position.t -> Position.t -> string -> 'a |
---|
22 | |
---|
23 | (** [global_error k msg] prints [msg] with [k] as a message prefix and stops |
---|
24 | the program. *) |
---|
25 | val global_error : string -> string -> 'a |
---|
26 | |
---|
27 | (** [warning k msg] prints [msg] with [k] as a message prefix, but do |
---|
28 | not stop the program. *) |
---|
29 | val warning : string -> string -> unit |
---|
Note: See
TracBrowser
for help on using the repository browser.