Commit 5f9c7c7d authored by MARCHE Claude's avatar MARCHE Claude
Browse files

Catch errors when opening source files in IDE

parent ebaec40b
......@@ -150,12 +150,15 @@ let try_convert s =
with Glib.Convert.Error _ as e -> Printexc.to_string e
let source_text fname =
try
let ic = open_in fname in
let size = in_channel_length ic in
let buf = String.create size in
really_input ic buf 0 size;
close_in ic;
try_convert buf
with e when not (Debug.test_flag Debug.stack_trace) ->
"Error while opening or reading file '" ^ fname ^ "':\n" ^ (Printexc.to_string e)
(********************************)
(* loading WhyIDE configuration *)
......
......@@ -17,7 +17,6 @@ open Ident
open Ty
open Term
open Decl
open Theory
open Printer
let ident_printer =
......
......@@ -17,7 +17,6 @@ open Ident
open Ty
open Term
open Decl
open Theory
open Printer
(** SMTLIB tokens taken from CVC4: src/parser/smt2/Smt2.g *)
......
......@@ -17,7 +17,6 @@ open Ident
open Ty
open Term
open Decl
open Theory
open Printer
let ident_printer =
......
......@@ -2103,7 +2103,7 @@ let rec recompute_all_shapes_goal ~release g =
g.goal_checksum <- Termcode.task_checksum t;
if release then release_task g;
iter_goal
(fun pa -> ())
(fun _pa -> ())
(iter_transf (recompute_all_shapes_goal ~release))
(iter_metas (recompute_all_shapes_goal ~release))
g
......
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