mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-10 05:03:59 -05:00
chore: better error printing
This commit is contained in:
parent
543f8a5a99
commit
bc1a573407
1 changed files with 2 additions and 2 deletions
|
|
@ -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@.";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue