From ea3909466eaaf86ff212c0a002e5df11e4a979f5 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Mon, 18 May 2015 17:47:58 +0200 Subject: The Fail command does not catch uncaught exception anomalies anymore. --- lib/errors.ml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/errors.ml') diff --git a/lib/errors.ml b/lib/errors.ml index 999d99ee08..c60442654a 100644 --- a/lib/errors.ml +++ b/lib/errors.ml @@ -120,3 +120,12 @@ let noncritical = function | Timeout | Drop | Quit -> false | Invalid_argument "equal: functional value" -> false | _ -> true + +(** Check whether an exception is handled *) + +exception Bottom + +let handled e = + let bottom _ = raise Bottom in + try let _ = print_gen bottom !handle_stack e in true + with Bottom -> false -- cgit v1.2.3