From 7ebd48121f0dad00852695436398b107864a31c3 Mon Sep 17 00:00:00 2001 From: jrm Date: Tue, 11 Aug 2015 09:25:37 -0700 Subject: [PATCH] [infer][backend] do not catch exceptions thrown by failwith Summary: This diff allows to use to make Infer failing when using the function `failwith`. This is especially useful to use while applying complex refactoring. --- infer/src/backend/exceptions.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/infer/src/backend/exceptions.ml b/infer/src/backend/exceptions.ml index 16ee18944..96c4c51f8 100644 --- a/infer/src/backend/exceptions.ml +++ b/infer/src/backend/exceptions.ml @@ -218,6 +218,8 @@ let recognize_exception exn = (Localise.use_after_free, desc, Some mloc, Exn_user, High, None, Prover) | Wrong_argument_number mloc -> (Localise.from_string "Wrong_argument_number", Localise.no_desc, Some mloc, Exn_developer, Low, None, Nocat) + | Failure _ as f -> + raise f | exn -> let exn_name = Printexc.to_string exn in (Localise.from_string exn_name, Localise.no_desc, None, Exn_developer, Low, None, Nocat) in