summaryrefslogtreecommitdiff
path: root/src/main.ml
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-05 22:52:11 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-12-05 22:52:11 +0100
commitcdc464d57821ef3061f485b37c60dee8ee9af021 (patch)
tree361b3f0a171cf9b36ef979b54cd2e1e070b3bcda /src/main.ml
parenta60e8a8eabde116cc3da920b637bc4f6f5b8b17c (diff)
downloadLPC-Projet-cdc464d57821ef3061f485b37c60dee8ee9af021.tar.gz
LPC-Projet-cdc464d57821ef3061f485b37c60dee8ee9af021.zip
Meilleur gestion des erreurs.
Diffstat (limited to 'src/main.ml')
-rw-r--r--src/main.ml9
1 files changed, 6 insertions, 3 deletions
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