source: Deliverables/D5.1/cost-plug-in/wrapper/error.mli @ 1462

Last change on this file since 1462 was 1462, checked in by ayache, 8 years ago

Added D5.1: Frama-C plug-in and Lustre wrapper. D2.2 (8051) has been updated accordingly.

File size: 1.1 KB
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.) *)
5val exit_if_error: unit -> unit
6
7(** [resume_if_error ()] makes the program throw the exception {!Error}
8    if an error is encountered. *)
9val resume_if_error: unit -> unit
10
11exception Error of Position.t list * string
12
13(** [print_error positions msg] formats an error message. *)
14val 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. *)
18val error : string -> Position.t -> string -> 'a
19 
20(** [error2 k p1 p2 msg] prints two positions instead of one. *)
21val 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. *)
25val 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. *)
29val warning : string -> string -> unit
Note: See TracBrowser for help on using the repository browser.