diff options
author | Stephane Glondu <steph@glondu.net> | 2009-02-01 00:54:40 +0100 |
---|---|---|
committer | Stephane Glondu <steph@glondu.net> | 2009-02-01 00:54:40 +0100 |
commit | cfbfe13f5b515ae2e3c6cdd97e2ccee03bc26e56 (patch) | |
tree | b7832bd5d412a5a5d69cb36ae2ded62c71124c22 /toplevel/protectedtoplevel.ml | |
parent | 113b703a695acbe31ac6dd6a8c4aa94f6fda7545 (diff) |
Imported Upstream version 8.2~rc2+dfsgupstream/8.2.rc2+dfsg
Diffstat (limited to 'toplevel/protectedtoplevel.ml')
-rw-r--r-- | toplevel/protectedtoplevel.ml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/toplevel/protectedtoplevel.ml b/toplevel/protectedtoplevel.ml index a9ff3326..caf32305 100644 --- a/toplevel/protectedtoplevel.ml +++ b/toplevel/protectedtoplevel.ml @@ -6,11 +6,12 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(* $Id: protectedtoplevel.ml 5920 2004-07-16 20:01:26Z herbelin $ *) +(* $Id: protectedtoplevel.ml 11784 2009-01-14 11:36:32Z herbelin $ *) open Pp open Line_oriented_parser open Vernac +open Vernacexpr (* The toplevel parsing loop we propose here is more robust to printing errors. The philosophy is that all commands should be individually wrapped @@ -130,7 +131,8 @@ let rec parse_one_command_group input_channel = !global_request_id !count None) | Some(rank, e) -> (match e with - DuringCommandInterp(a,e1) -> + | DuringCommandInterp(a,e1) + | Stdpp.Exc_located (a,DuringSyntaxChecking e1) -> output_results_nl (acknowledge_command !global_request_id rank (Some e1)) @@ -164,7 +166,8 @@ let protected_loop input_chan = | End_of_file -> exit 0 | DuringCommandInterp(loc, Vernacexpr.Quit) -> raise Vernacexpr.Quit | DuringCommandInterp(loc, Vernacexpr.Drop) -> raise Vernacexpr.Drop - | DuringCommandInterp(loc, e) -> + | DuringCommandInterp(loc, e) + | Stdpp.Exc_located (loc,DuringSyntaxChecking e) -> explain_and_restart e | e -> explain_and_restart e in begin |