|
@@ -118,9 +118,14 @@ let rec get_basic rc_name =
|
|
match Sys.file_exists rc_name with
|
|
match Sys.file_exists rc_name with
|
|
| `No -> create_basic rc_name; get_basic rc_name
|
|
| `No -> create_basic rc_name; get_basic rc_name
|
|
| `Unknown -> failwith "Error reading configuration file";
|
|
| `Unknown -> failwith "Error reading configuration file";
|
|
- | `Yes -> (* Try to read, if there is an error, reset file *)
|
|
|
|
- Sexp.load_sexp rc_name
|
|
|
|
- |> basic_rc_of_sexp
|
|
|
|
|
|
+ | `Yes -> try Sexp.load_sexp rc_name |> basic_rc_of_sexp
|
|
|
|
+ with exn ->
|
|
|
|
+ Messages.warning "Problem reading rc file";
|
|
|
|
+ sprintf
|
|
|
|
+ "Remove file '%s' to get a fresh rc file next time you call oclaunch"
|
|
|
|
+ rc_name
|
|
|
|
+ |> Messages.tips;
|
|
|
|
+ raise exn
|
|
;;
|
|
;;
|
|
|
|
|
|
(* From objects to types *)
|
|
(* From objects to types *)
|