diff --git a/compiler/catala_utils/errors.ml b/compiler/catala_utils/errors.ml index 489de670..1069d6d7 100644 --- a/compiler/catala_utils/errors.ml +++ b/compiler/catala_utils/errors.ml @@ -48,6 +48,12 @@ let raise_multispanned_error (spans : (string option * Pos.t) list) format = let raise_error format = Format.kasprintf (fun msg -> raise (StructuredError (msg, []))) format +let raise_internal_error format = + raise_error + ("Internal Error, please report to \ + https://github.com/CatalaLang/catala/issues: " + ^^ format) + (** {1 Warning printing}*) let format_multispanned_warning (pos : (string option * Pos.t) list) format = diff --git a/compiler/catala_utils/errors.mli b/compiler/catala_utils/errors.mli index 4a63ea61..b13fc886 100644 --- a/compiler/catala_utils/errors.mli +++ b/compiler/catala_utils/errors.mli @@ -34,6 +34,7 @@ val raise_multispanned_error : (string option * Pos.t) list -> ('a, Format.formatter, unit, 'b) format4 -> 'a val raise_error : ('a, Format.formatter, unit, 'b) format4 -> 'a +val raise_internal_error : ('a, Format.formatter, unit, 'b) format4 -> 'a (** {1 Warning printing}*)