Skip to content
Snippets Groups Projects
Commit bff6fbb0 authored by Michele Alberti's avatar Michele Alberti
Browse files

Cleaner version of exception global matching/handling.

parent 1f6d08f2
No related branches found
No related tags found
No related merge requests found
......@@ -176,11 +176,10 @@ let default_cmd =
Term.info caisar ~version ~doc ~sdocs ~exits:Term.default_exits ~man )
let () =
try
match
Term.(eval_choice ~catch:false default_cmd [ config_cmd; verify_cmd ])
with
| `Error _ -> Caml.exit 1
| _ -> Caml.exit (if Logs.err_count () > 0 then 1 else 0)
with exn when not (log_level_is_debug ()) ->
match
Term.(eval_choice ~catch:false default_cmd [ config_cmd; verify_cmd ])
with
| `Error _ -> Caml.exit 1
| _ -> Caml.exit (if Logs.err_count () > 0 then 1 else 0)
| exception exn when not (log_level_is_debug ()) ->
Fmt.epr "%a@." Why3.Exn_printer.exn_printer exn
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment