Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add catches #582

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/coq_elpi_vernacular.ml
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,9 @@ module Interp = struct
end with e ->
let e = Exninfo.capture e in
Vernacstate.Synterp.unfreeze final_synterp_state;
(match fst e with
| CErrors.UserError _ -> ()
| _ -> Feedback.msg_debug Pp.(str "elpi lets escape exception: " ++ CErrors.print (fst e)));
Exninfo.iraise e)

let run_in_program ?program ~syndata query =
Expand Down Expand Up @@ -639,7 +642,8 @@ let run_tactic_common loc ?(static_check=false) program ~main ?(atts=[]) () =
| API.Execute.Success solution -> Coq_elpi_HOAS.tclSOLUTION2EVD sigma solution
| API.Execute.NoMoreSteps -> CErrors.user_err Pp.(str "elpi run out of steps")
| API.Execute.Failure -> elpi_fails program
| exception (Coq_elpi_utils.LtacFail (level, msg)) -> tclFAILn level msg)
| exception (Coq_elpi_utils.LtacFail (level, msg)) -> tclFAILn level msg
| exception e -> let e = Exninfo.capture e in (Feedback.msg_debug Pp.(str "elpi lets escape exception: " ++ CErrors.print (fst e)); Exninfo.iraise e))
tclIDTAC

let run_tactic loc program ~atts _ist args =
Expand Down
Loading