summaryrefslogtreecommitdiff
path: root/src/main.ml
diff options
context:
space:
mode:
authorKathy Gray2013-07-31 15:37:15 +0100
committerKathy Gray2013-07-31 15:37:15 +0100
commit7724520fc51f127bd9f4451129b1ad38b872a53d (patch)
treef316c54f2f35d7dac179be007b31b2d96bc7ee31 /src/main.ml
parentebe968fcb8d67a7065bd75e56c39c7f9a0a3a615 (diff)
Adding reporting basic from Lem development, also adding basic error messages for syntax and lexical errors (i.e. syntax error and location information)
Diffstat (limited to 'src/main.ml')
-rw-r--r--src/main.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.ml b/src/main.ml
index f790627c..b5e7878b 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -404,4 +404,9 @@ let main() =
then Printf.printf "L2 pre alpha \n"
else ignore(List.map (fun f -> (parse_file f)) !opt_file_arguments)
-let _ = main()
+let _ = try
+ begin
+ try ignore(main ())
+ with Failure(s) -> raise (Reporting_basic.err_general Parse_ast.Unknown ("Failure "^s))
+ end
+ with Reporting_basic.Fatal_error e -> Reporting_basic.report_error e