home
/
code
/
tiger.ml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Centralize error message construction
[tiger.ml.git]
/
compiler
/
src
/
lib
/
tiger
/
tiger_error.ml
diff --git a/compiler/src/lib/tiger/tiger_error.ml
b/compiler/src/lib/tiger/tiger_error.ml
new file mode 100644
(file)
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)
This page took
0.021032 seconds
and
4
git commands to generate.