diff options
Diffstat (limited to 'lib/errors.ml')
| -rw-r--r-- | lib/errors.ml | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
