Catched exception unkown_status in parselog

This commit is contained in:
Guillaume Bury 2014-11-17 17:20:20 +01:00
parent 5bcb8ae99f
commit 4ee3566aa0
3 changed files with 9 additions and 9 deletions

View file

@ -148,10 +148,6 @@ let main () =
try
main ()
with
| Parselog.Unknown_status (f, l) ->
Format.printf "For file '%s' : unknown return string :@\n" f;
List.iter (fun s -> Format.printf "%s@." s) l;
exit 3
| Commit_not_found ->
Format.printf "No such commit found@.";
exit 2

View file

@ -72,7 +72,10 @@ let status_of_lines f = function
| ["Unsat"] -> Unsat
| ["Time limit exceeded"; _] -> Timeout
| ["Size limit exceeded"; _] -> Spaceout
| l -> raise (Unknown_status (f, l))
| l ->
Format.printf "For file '%s' : unknown return string :@\n" f;
List.iter (fun s -> Format.printf "%s@." s) l;
raise (Unknown_status (f, l))
let parse_raw f =
let f_in = open_in f in
@ -94,6 +97,10 @@ let parse_raw f =
let parse_commit root =
let l = list_dir_files_rec (Filename.concat root "raw") in
let res = Hashtbl.create (List.length l) in
List.iter (fun f -> try Hashtbl.add res f (parse_raw f) with Empty_raw _ -> ()) l;
List.iter (fun f ->
try
Hashtbl.add res f (parse_raw f)
with Empty_raw _ | Unknown_status _ -> ()
) l;
res

View file

@ -4,9 +4,6 @@ Copyright 2014 Guillaume Bury
Copyright 2014 Simon Cruanes
*)
exception Empty_raw of string
exception Unknown_status of string * string list
val complete : string -> string -> string list
val commit_info : string -> string
val last_commit : unit -> string