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