Commit 6be9edb9 authored by MARCHE Claude's avatar MARCHE Claude

capture only parse or type errors on file load

parent 9ccb074f
......@@ -236,13 +236,12 @@ let reload_files (c : controller) ~use_shapes =
*)
let add_file c ?format fname =
try
let theories = Session_itp.read_file c.controller_env ?format fname in
let (_ : file) = add_file_section c.controller_session fname (Some theories) format in
None
with e ->
let (_ : file) = add_file_section c.controller_session fname None format in
Some e
let theories,errors =
try Some (Session_itp.read_file c.controller_env ?format fname), None
with e -> None, Some e
in
let (_ : file) = add_file_section c.controller_session fname theories format in
errors
......
......@@ -747,8 +747,10 @@ let rec update_goal_node notification s id =
in
if proved <> pn_proved s id then
begin
(* too noisy, uncomment if you really need it
Debug.dprintf debug "[Session] setting goal node %a to status proved=%b@."
print_proofNodeID id proved;
*)
Hpn.replace s.pn_state id proved;
notification (APn id);
match get_proof_parent s id with
......@@ -1598,8 +1600,9 @@ let add_file_section (s:session) (fn:string)
Debug.dprintf debug "[Session_itp.add_file_section] fn = %s@." fn;
if Hstr.mem s.session_files fn then
begin
Debug.dprintf debug "[session] file %s already in database@." fn;
assert false
Format.eprintf "[session] FATAL: file %s already in database@\n%s@." fn
(Printexc.get_backtrace ());
exit 2
end
else
match theories with
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment