summaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
Diffstat (limited to 'driver')
-rw-r--r--driver/compile.ml2
-rw-r--r--driver/errors.ml5
-rw-r--r--driver/optcompile.ml2
-rw-r--r--driver/opterrors.ml5
4 files changed, 6 insertions, 8 deletions
diff --git a/driver/compile.ml b/driver/compile.ml
index 285db4743..d79101792 100644
--- a/driver/compile.ml
+++ b/driver/compile.ml
@@ -77,7 +77,7 @@ let parse_file inputfile parse_fun ast_magic =
else false
with
Outdated_version ->
- failwith "Ocaml and preprocessor have incompatible versions"
+ fatal_error "Ocaml and preprocessor have incompatible versions"
| _ -> false
in
let ast =
diff --git a/driver/errors.ml b/driver/errors.ml
index c93f6f3eb..6b032f782 100644
--- a/driver/errors.ml
+++ b/driver/errors.ml
@@ -24,9 +24,8 @@ let report_error exn =
Lexer.Error(err, start, stop) ->
Location.print {loc_start = start; loc_end = stop};
Lexer.report_error err
- | Parse.Error(start, stop) ->
- Location.print {loc_start = start; loc_end = stop};
- print_string "Syntax error"
+ | Syntaxerr.Error err ->
+ Syntaxerr.report_error err
| Env.Error err ->
Env.report_error err
| Typecore.Error(loc, err) ->
diff --git a/driver/optcompile.ml b/driver/optcompile.ml
index 7d1e67a94..897f03910 100644
--- a/driver/optcompile.ml
+++ b/driver/optcompile.ml
@@ -74,7 +74,7 @@ let parse_file inputfile parse_fun ast_magic =
else false
with
Outdated_version ->
- failwith "Ocaml and preprocessor have incompatible versions"
+ fatal_error "Ocaml and preprocessor have incompatible versions"
| _ -> false
in
let ast =
diff --git a/driver/opterrors.ml b/driver/opterrors.ml
index 01b3f4dd4..a5910355d 100644
--- a/driver/opterrors.ml
+++ b/driver/opterrors.ml
@@ -24,9 +24,8 @@ let report_error exn =
Lexer.Error(err, start, stop) ->
Location.print {loc_start = start; loc_end = stop};
Lexer.report_error err
- | Parse.Error(start, stop) ->
- Location.print {loc_start = start; loc_end = stop};
- print_string "Syntax error"
+ | Syntaxerr.Error err ->
+ Syntaxerr.report_error err
| Env.Error err ->
Env.report_error err
| Typecore.Error(loc, err) ->