aboutsummaryrefslogtreecommitdiff
path: root/engine/proofview.ml
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2019-08-01 15:14:42 +0200
committerEmilio Jesus Gallego Arias2019-08-27 16:57:23 +0200
commit94c8f42eea1c36f582fe2390680de75634324c85 (patch)
tree56cf6addaf2c97d26855437cc78a3becf1ef726d /engine/proofview.ml
parent1e1d5bf3879424688fa9231ba057b05d86674d22 (diff)
[cleanup] Replace uses of UserError constructor, clarify exception names.
We replace some uses of `raise (UserError ...)` with `CErrors.user_err`, ideally we would like to make the error raising API not depend on the exception themselves, but that's still a long way to go. We also rename the `Timeout` exception as to clarify purpose in the codebase, given that it has 3 different ones as of today. cc: #7560
Diffstat (limited to 'engine/proofview.ml')
-rw-r--r--engine/proofview.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/proofview.ml b/engine/proofview.ml
index 8b5bd4cd80..8b8382ea53 100644
--- a/engine/proofview.ml
+++ b/engine/proofview.ml
@@ -905,11 +905,10 @@ let tclPROGRESS t =
if not test then
tclUNIT res
else
- tclZERO (CErrors.UserError (Some "Proofview.tclPROGRESS" , Pp.str"Failed to progress."))
+ tclZERO (CErrors.UserError (Some "Proofview.tclPROGRESS", Pp.str "Failed to progress."))
-exception Timeout
let _ = CErrors.register_handler begin function
- | Timeout -> CErrors.user_err ~hdr:"Proofview.tclTIMEOUT" (Pp.str"Tactic timeout!")
+ | Logic_monad.Tac_Timeout -> CErrors.user_err ~hdr:"Proofview.tclTIMEOUT" (Pp.str"Tactic timeout!")
| _ -> raise CErrors.Unhandled
end
@@ -934,7 +933,8 @@ let tclTIMEOUT n t =
end
begin let open Logic_monad.NonLogical in function (e, info) ->
match e with
- | Logic_monad.Timeout -> return (Util.Inr (Timeout, info))
+ | Logic_monad.Tac_Timeout ->
+ return (Util.Inr (Logic_monad.Tac_Timeout, info))
| Logic_monad.TacticFailure e ->
return (Util.Inr (e, info))
| e -> Logic_monad.NonLogical.raise ~info e