diff options
Diffstat (limited to 'errors.ml')
-rwxr-xr-x | errors.ml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/errors.ml b/errors.ml new file mode 100755 index 0000000..8f389ce --- /dev/null +++ b/errors.ml @@ -0,0 +1,12 @@ +
+(** The function is undefined *)
+exception Undefined of UTF8.t * string list
+
+exception TypeError
+
+let printf formatter = function
+ | Undefined (name, args) -> Format.fprintf formatter
+ "There is no function '%s' with signature %a"
+ (UTF8.to_utf8string name)
+ (Format.pp_print_list Format.pp_print_text) args
+ | _ -> Format.fprintf formatter "#Error"
|