From 4d1ec9bf977794a92de3614737f819723687cc03 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 23 Dec 2019 20:42:11 +0000 Subject: [PATCH] Print errors (Failure exceptions) nicely. --- src/main.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 1.8.3.1