From 33789b2d1706194d478a25098bd1991d2c845223 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Mon, 27 Nov 2017 19:18:21 +0100 Subject: [error] Replace msg_error by a proper exception. The current error mechanism in the core part of Coq is 100% exception based; there was some confusion in the past as to whether raising and exception could be replace with `Feedback.msg_error`. As of today, this is not the case [due to some issues in the layer that generates error feedbacks in the STM] so all cases of `msg_error` must raise an exception of print at a different level [for now]. --- lib/feedback.mli | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/feedback.mli') diff --git a/lib/feedback.mli b/lib/feedback.mli index 62b909516..37f38c8ff 100644 --- a/lib/feedback.mli +++ b/lib/feedback.mli @@ -94,8 +94,9 @@ val msg_warning : ?loc:Loc.t -> Pp.t -> unit consequences. *) val msg_error : ?loc:Loc.t -> Pp.t -> unit -(** Message indicating that something went really wrong, though still - recoverable; otherwise an exception would have been raised. *) +[@@ocaml.deprecated "msg_error is an internal function and should not be \ + used unless you know what you are doing. Use \ + [CErrors.user_err] instead."] val msg_debug : ?loc:Loc.t -> Pp.t -> unit (** For debugging purposes *) -- cgit v1.2.3