aboutsummaryrefslogtreecommitdiff
path: root/vernac/indschemes.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2020-01-08 20:14:35 +0100
committerEmilio Jesus Gallego Arias2020-03-03 16:54:16 -0500
commitb2c58a23a1f71c86d8a64147923214b5059bd747 (patch)
treeea91b763facc24df188bd481b7a60e238f7a60a2 /vernac/indschemes.ml
parent18aa9ca60ec9b3d1712276ec0c615dfe54c1a251 (diff)
[exninfo] Deprecate aliases for exception re-raising.
We make the primitives for backtrace-enriched exceptions canonical in the `Exninfo` module, deprecating all other aliases. At some point dependencies between `CErrors` and `Exninfo` were a bit complex, after recent clean-ups the roles seem much clearer so we can have a single place for `iraise` and `capture`.
Diffstat (limited to 'vernac/indschemes.ml')
-rw-r--r--vernac/indschemes.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/vernac/indschemes.ml b/vernac/indschemes.ml
index 227d2f1554..80616ecc2a 100644
--- a/vernac/indschemes.ml
+++ b/vernac/indschemes.ml
@@ -118,7 +118,7 @@ let alarm what internal msg =
let try_declare_scheme what f internal names kn =
try f internal names kn
with e ->
- let e = CErrors.push e in
+ let e = Exninfo.capture e in
let rec extract_exn = function Logic_monad.TacticFailure e -> extract_exn e | e -> e in
let msg = match extract_exn (fst e) with
| ParameterWithoutEquality cst ->
@@ -166,11 +166,11 @@ let try_declare_scheme what f internal names kn =
| e when CErrors.noncritical e ->
alarm what internal
(str "Unexpected error during scheme creation: " ++ CErrors.print e)
- | _ -> iraise e
+ | _ -> Exninfo.iraise e
in
match msg with
| None -> ()
- | Some msg -> iraise (UserError (None, msg), snd e)
+ | Some msg -> Exninfo.iraise (UserError (None, msg), snd e)
let beq_scheme_msg mind =
let mib = Global.lookup_mind mind in