diff options
| author | ppedrot | 2013-06-06 17:39:19 +0000 |
|---|---|---|
| committer | ppedrot | 2013-06-06 17:39:19 +0000 |
| commit | 136a5746aa6d3b841db6327deb61802aef518e66 (patch) | |
| tree | 9b6f9f17921fbecd9d7d1905e2e37aed634f87f3 | |
| parent | 371cc90e75226a2c4b8022860bc4bd09b3e6657a (diff) | |
Fixing bug #3030.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16567 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | proofs/pfedit.ml | 2 | ||||
| -rw-r--r-- | proofs/proofview.ml | 6 | ||||
| -rw-r--r-- | toplevel/vernacentries.ml | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/proofs/pfedit.ml b/proofs/pfedit.ml index cab86721f2..6132cc9c62 100644 --- a/proofs/pfedit.ml +++ b/proofs/pfedit.ml @@ -126,7 +126,7 @@ let solve_nth ?(with_end_tac=false) gi tac = Proof_global.run_tactic (Proofview.tclFOCUS gi gi tac) with | Proof_global.NoCurrentProof -> Errors.error "No focused proof" - | Proofview.IndexOutOfRange | Failure "List.chop" -> + | Proofview.IndexOutOfRange -> let msg = str "No such goal: " ++ int gi ++ str "." in Errors.errorlabstrm "" msg diff --git a/proofs/proofview.ml b/proofs/proofview.ml index 96ff63d230..45b7c084d7 100644 --- a/proofs/proofview.ml +++ b/proofs/proofview.ml @@ -113,10 +113,8 @@ let focus_context f = f let focus_sublist i j l = let (left,sub_right) = list_goto (i-1) l in let (sub, right) = - try - List.chop (j-i+1) sub_right - with Failure "list_chop" -> - Errors.errorlabstrm "nth_unproven" (Pp.str"No such unproven subgoal") + try List.chop (j-i+1) sub_right + with Failure _ -> raise IndexOutOfRange in (sub, (left,right)) diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml index d7d6bc8f1d..841919a299 100644 --- a/toplevel/vernacentries.ml +++ b/toplevel/vernacentries.ml @@ -1625,7 +1625,9 @@ let vernac_focus gln = if Int.equal n 0 then Errors.error "Invalid goal number: 0. Goal numbering starts with 1." else - Proof.focus focus_command_cond () n p; print_subgoals () + try Proof.focus focus_command_cond () n p; print_subgoals () + with Proofview.IndexOutOfRange -> + Errors.error "No such unproven subgoal." (* Unfocuses one step in the focus stack. *) let vernac_unfocus () = |
