chore: better error printing

This commit is contained in:
Simon Cruanes 2018-04-02 21:07:54 -05:00
parent 543f8a5a99
commit bc1a573407

View file

@ -162,13 +162,13 @@ let main () =
let () = match main() with let () = match main() with
| E.Ok () -> () | E.Ok () -> ()
| E.Error msg -> | E.Error msg ->
print_endline msg; Format.printf "@{<Red>Error@}: %s@." msg;
exit 1 exit 1
| exception e -> | exception e ->
let b = Printexc.get_backtrace () in let b = Printexc.get_backtrace () in
begin match e with begin match e with
| Util.Error msg -> | Util.Error msg ->
print_endline msg; Format.printf "@{<Red>Error@}: %s@." msg;
ignore @@ exit 1 ignore @@ exit 1
| Out_of_time -> | Out_of_time ->
Format.printf "Timeout@."; Format.printf "Timeout@.";