File: ag_error.ml

package info (click to toggle)
atdgen 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,004 kB
  • sloc: ml: 7,028; makefile: 296; sh: 47
file content (11 lines) | stat: -rw-r--r-- 326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
(* $Id: ag_error.ml 45868 2010-07-29 21:45:28Z martin $ *)

open Printf

let error loc msg =
  failwith (sprintf "%s:\n%s" (Atd_ast.string_of_loc loc) msg)

let error2 loc1 msg1 loc2 msg2 =
  failwith (sprintf "%s:\n%s\n%s:\n%s"
              (Atd_ast.string_of_loc loc1) msg1
              (Atd_ast.string_of_loc loc2) msg2)