From: Richard W.M. Jones Date: Mon, 23 Dec 2019 20:42:11 +0000 (+0000) Subject: Print errors (Failure exceptions) nicely. X-Git-Tag: v'0.2'~139 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=4d1ec9bf977794a92de3614737f819723687cc03;p=goals.git Print errors (Failure exceptions) nicely. --- diff --git a/src/main.ml b/src/main.ml index b95d1f5..73a53da 100644 --- a/src/main.ml +++ b/src/main.ml @@ -97,4 +97,7 @@ let main () = (* Evaluate the target expressions in turn. *) Eval.evaluate_targets env targets -let () = main () +let () = + try main () + with + Failure msg -> prerr_endline msg; exit 1