Skip to content

Commit

Permalink
[java] ignore some Sawja exceptions caused by Kotlin files
Browse files Browse the repository at this point in the history
Reviewed By: ezgicicek

Differential Revision: D30510781

fbshipit-source-id: 95783baed
  • Loading branch information
ngorogiannis authored and facebook-github-bot committed Aug 27, 2021
1 parent 0d7d70b commit 3ce84b3
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions infer/src/java/jTrans.ml
Expand Up @@ -464,9 +464,17 @@ let create_cm_procdesc source_file program icfg cm proc_name =
Procdesc.set_start_node procdesc start_node ;
Procdesc.set_exit_node procdesc exit_node ;
Some (procdesc, start_node, exit_node, exn_node, jbir_code)
with JBir.Subroutine when Config.mask_sajwa_exceptions ->
L.internal_error "create_procdesc raised JBir.Subroutine when translating %a in %a@."
Procname.pp proc_name SourceFile.pp source_file ;
with
| (JBir.Subroutine as exn)
| (Sawja_pack.Bir.NonemptyStack_backward_jump as exn)
| (Sawja_pack.Bir.Uninit_is_not_expr as exn)
->
IExn.reraise_if
~f:(fun () ->
L.internal_error "create_procdesc raised %a when translating %a in %a@\n" Exn.pp exn
Procname.pp proc_name SourceFile.pp source_file ;
not Config.mask_sajwa_exceptions )
exn ;
None


Expand Down

0 comments on commit 3ce84b3

Please sign in to comment.