From a4a9433982a8c06b7184f1d75942d824d53c15c7 Mon Sep 17 00:00:00 2001 From: Nikos Gorogiannis Date: Wed, 23 Jun 2021 08:07:46 -0700 Subject: [PATCH] [ondemand] print exception Summary: Be more informative when swallowing exceptions. Reviewed By: da319 Differential Revision: D29328228 fbshipit-source-id: e914cca82 --- infer/src/backend/ondemand.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/infer/src/backend/ondemand.ml b/infer/src/backend/ondemand.ml index 97ab08acb..0594d2c06 100644 --- a/infer/src/backend/ondemand.ml +++ b/infer/src/backend/ondemand.ml @@ -225,12 +225,13 @@ let run_proc_analysis exe_env ~caller_pdesc callee_pdesc = clear_actives () ; restore_global_state old_state ; true - | _ -> + | exn -> if not !logged_error then ( let source_file = attributes.ProcAttributes.translation_unit in let location = attributes.ProcAttributes.loc in - L.internal_error "While analysing function %a:%a at %a@\n" SourceFile.pp source_file - Procname.pp callee_pname Location.pp_file_pos location ; + L.internal_error "While analysing function %a:%a at %a, raised %s@\n" SourceFile.pp + source_file Procname.pp callee_pname Location.pp_file_pos location + (Exn.to_string exn) ; logged_error := true ) ; restore_global_state old_state ; not Config.keep_going ) ;