aboutsummaryrefslogtreecommitdiff
path: root/toplevel
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-03-09 17:43:12 +0100
committerPierre-Marie Pédrot2016-03-09 17:43:12 +0100
commitfdbad8894dec9df0294e91aac61ce47d5af609d4 (patch)
tree9606652bb2c7016c6087c6238a06ed756d460293 /toplevel
parentc633bb322acf0bb626eafe6158287d1ddc11af26 (diff)
parent2788c86e6a3c089aa7450a7768f8444470e35901 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/indschemes.ml13
1 files changed, 10 insertions, 3 deletions
diff --git a/toplevel/indschemes.ml b/toplevel/indschemes.ml
index 251d14af79..367425546f 100644
--- a/toplevel/indschemes.ml
+++ b/toplevel/indschemes.ml
@@ -151,12 +151,14 @@ let alarm what internal msg =
| InternalTacticRequest ->
(if debug then
msg_warning
- (hov 0 msg ++ fnl () ++ what ++ str " not defined."))
- | _ -> errorlabstrm "" msg
+ (hov 0 msg ++ fnl () ++ what ++ str " not defined.")); None
+ | _ -> Some msg
let try_declare_scheme what f internal names kn =
try f internal names kn
- with
+ with e ->
+ let e = Errors.push e in
+ let msg = match fst e with
| ParameterWithoutEquality cst ->
alarm what internal
(str "Boolean equality not found for parameter " ++ pr_con cst ++
@@ -187,6 +189,11 @@ let try_declare_scheme what f internal names kn =
| e when Errors.noncritical e ->
alarm what internal
(str "Unexpected error during scheme creation: " ++ Errors.print e)
+ | _ -> iraise e
+ in
+ match msg with
+ | None -> ()
+ | Some msg -> iraise (UserError ("", msg), snd e)
let beq_scheme_msg mind =
let mib = Global.lookup_mind mind in