From cdc464d57821ef3061f485b37c60dee8ee9af021 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Thu, 5 Dec 2013 22:52:11 +0100 Subject: Meilleur gestion des erreurs. --- src/main.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main.ml') diff --git a/src/main.ml b/src/main.ml index 35bd6e0..1a7d5b1 100644 --- a/src/main.ml +++ b/src/main.ml @@ -63,11 +63,14 @@ let () = localisation (Lexing.lexeme_start_p buf); eprintf "Parsing error.@."; exit 1 - | Typing.Error (loc, msg) -> + | Typing.Error(msg) -> + eprintf "Typing error (unknown location): %s@." msg; + exit 2 + | Typing.LocError (loc, msg) -> localisation2 loc; eprintf "%s@." msg; - exit 1 + exit 2 | _ -> eprintf "Unexpected error...@."; - exit 2 + exit 3 -- cgit v1.2.3