diff options
| author | Pierre-Marie Pédrot | 2015-09-13 17:19:18 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2015-09-20 15:20:32 +0200 |
| commit | 002cd2e8f6ae5722e72a5db136cda7414f9218d5 (patch) | |
| tree | e45f8de4e5c493f08a5cabf4593125f4befe66fb /ide/ide_slave.ml | |
| parent | f20fce1259563f2081fadc62ccab1304bb8161d5 (diff) | |
Rich printing of CoqIDE protocol failure.
Diffstat (limited to 'ide/ide_slave.ml')
| -rw-r--r-- | ide/ide_slave.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ide/ide_slave.ml b/ide/ide_slave.ml index 414c360246..c28ed68605 100644 --- a/ide/ide_slave.ml +++ b/ide/ide_slave.ml @@ -330,10 +330,14 @@ let handle_exn (e, info) = let loc_of e = match Loc.get_loc e with | Some loc when not (Loc.is_ghost loc) -> Some (Loc.unloc loc) | _ -> None in - let mk_msg () = read_stdout ()^"\n"^string_of_ppcmds (Errors.print ~info e) in + let mk_msg () = + let msg = read_stdout () in + let msg = str msg ++ fnl () ++ Errors.print ~info e in + Richpp.richpp_of_pp msg + in match e with - | Errors.Drop -> dummy, None, "Drop is not allowed by coqide!" - | Errors.Quit -> dummy, None, "Quit is not allowed by coqide!" + | Errors.Drop -> dummy, None, Richpp.richpp_of_string "Drop is not allowed by coqide!" + | Errors.Quit -> dummy, None, Richpp.richpp_of_string "Quit is not allowed by coqide!" | e -> match Stateid.get info with | Some (valid, _) -> valid, loc_of info, mk_msg () |
