[infer][java] catch Invalid_argument exception when translating the bytecode to the Sawja JBir representation

Reviewed By: sblackshear, mbouaziz, jvillard

Differential Revision: D6602288

fbshipit-source-id: b63f6dc
master
Jeremy Dubreil 7 years ago committed by Facebook Github Bot
parent 8732c7d7a1
commit 93b9f2c488

@ -108,7 +108,7 @@ let iterate_callbacks call_graph exe_env =
let analyze_proc_name pname =
match Ondemand.get_proc_desc pname with
| None ->
L.(die InternalError) "Could not find proc desc for %a" Typ.Procname.pp pname
L.internal_error "Could not find proc desc for %a" Typ.Procname.pp pname
| Some pdesc ->
ignore (Ondemand.analyze_proc_desc pdesc pdesc)
in

@ -400,9 +400,15 @@ let create_cm_procdesc source_file program linereader icfg cm proc_name skip_imp
procdesc
in
Some (procdesc, bytecode, jbir_code)
with JBir.Subroutine ->
L.internal_error "create_procdesc raised JBir.Subroutine on %a@." Typ.Procname.pp proc_name ;
None
with
| JBir.Subroutine ->
L.internal_error "create_procdesc raised JBir.Subroutine when translating %a in %a@."
Typ.Procname.pp proc_name SourceFile.pp source_file ;
None
| Invalid_argument msg ->
L.internal_error "create_procdesc raised Invalid_argument \"%s\" when translating %a in %a@."
msg Typ.Procname.pp proc_name SourceFile.pp source_file ;
None
let builtin_new = Exp.Const (Const.Cfun BuiltinDecl.__new)

Loading…
Cancel
Save