File: error.ml

package info (click to toggle)
mlglade 0.5-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 480 kB
  • ctags: 386
  • sloc: ml: 4,519; makefile: 152; sh: 4
file content (31 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
(*
 * $Id: error.ml,v 1.2 2002/03/21 16:45:39 monate Exp $

    Copyright (c) 1999 Christian Lindig <lindig@ips.cs.tu-bs.de>. All
    rights reserved. See COPYING for details.
 *
 * Global error and warning treatment.
 *)


(* The universal error exception
 *)

exception Error of string

(* [error] raises [Error]
 *)

let error msg	= raise (Error msg)

(* [warning] issues a warning to stderr
 *)

let quiet = ref false

let verbose = ref 0

let warning msg = if not !quiet then prerr_endline ("warning: " ^ msg)