mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-07 11:45:41 -05:00
Catched exception unkown_status in parselog
This commit is contained in:
parent
5bcb8ae99f
commit
4ee3566aa0
3 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue