aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cerrors.ml
diff options
context:
space:
mode:
Diffstat (limited to 'cparser/Cerrors.ml')
-rw-r--r--cparser/Cerrors.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/cparser/Cerrors.ml b/cparser/Cerrors.ml
index 5c077f37..a4d1a3f8 100644
--- a/cparser/Cerrors.ml
+++ b/cparser/Cerrors.ml
@@ -30,7 +30,7 @@ exception Abort
to print its message, as opposed to [Format], and does not automatically
introduce indentation and a final dot into the message. This is useful
for multi-line messages. *)
-
+
let fatal_error_raw fmt =
incr num_errors;
Printf.kfprintf
@@ -67,4 +67,6 @@ let check_errors () =
(if !num_warnings = 1 then "" else "s");
!num_errors > 0 || (!warn_error && !num_warnings > 0)
-
+let raise_on_errors () =
+ if !num_errors > 0 || (!warn_error && !num_warnings > 0) then
+ raise Abort