diff options
| author | Pierre-Marie Pédrot | 2015-06-01 11:40:35 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2015-06-01 11:40:35 +0200 |
| commit | dc2405f017f5b784d3c7393ae2b4ba1ef710d10b (patch) | |
| tree | ea2defb1691834c73f35bb9cf8912cdb04f3f7b8 /lib/errors.ml | |
| parent | 3fcadca93b8d9dd70d9d93412cbacf8d4e851ed7 (diff) | |
| parent | 43aa642ad4f2d30029c1c1f272ba162b6801a40b (diff) | |
Merge branch 'v8.5'
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 |
