[ondemand] print exception

Summary: Be more informative when swallowing exceptions.

Reviewed By: da319

Differential Revision: D29328228

fbshipit-source-id: e914cca82
master
Nikos Gorogiannis 3 years ago committed by Facebook GitHub Bot
parent 678386acbb
commit a4a9433982

@ -225,12 +225,13 @@ let run_proc_analysis exe_env ~caller_pdesc callee_pdesc =
clear_actives () ; clear_actives () ;
restore_global_state old_state ; restore_global_state old_state ;
true true
| _ -> | exn ->
if not !logged_error then ( if not !logged_error then (
let source_file = attributes.ProcAttributes.translation_unit in let source_file = attributes.ProcAttributes.translation_unit in
let location = attributes.ProcAttributes.loc in let location = attributes.ProcAttributes.loc in
L.internal_error "While analysing function %a:%a at %a@\n" SourceFile.pp source_file L.internal_error "While analysing function %a:%a at %a, raised %s@\n" SourceFile.pp
Procname.pp callee_pname Location.pp_file_pos location ; source_file Procname.pp callee_pname Location.pp_file_pos location
(Exn.to_string exn) ;
logged_error := true ) ; logged_error := true ) ;
restore_global_state old_state ; restore_global_state old_state ;
not Config.keep_going ) ; not Config.keep_going ) ;

Loading…
Cancel
Save