X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=compiler%2Fsrc%2Flib%2Ftiger%2Ftiger_error.ml;fp=compiler%2Fsrc%2Flib%2Ftiger%2Ftiger_error.ml;h=eb2c177bb3ae4fafb6f381b48bcd8ca21b4a18b4;hb=7c14a966d15aab098a4239b6ae6a3fc207504e7f;hp=0000000000000000000000000000000000000000;hpb=2eadd9297a93ac7776a810ed44a547b67dddf32b;p=tiger.ml.git diff --git a/compiler/src/lib/tiger/tiger_error.ml b/compiler/src/lib/tiger/tiger_error.ml new file mode 100644 index 0000000..eb2c177 --- /dev/null +++ b/compiler/src/lib/tiger/tiger_error.ml @@ -0,0 +1,7 @@ +module Pos = Tiger_position + +exception T of string + +let exn ~pos ~msg = + let msg = Printf.sprintf "Error: %s. In %s." msg (Pos.to_string pos) in + raise (T msg)