Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Catch with multiple exceptions not catching exceptions in obfuscated build

I have used catch block with multiple exceptions , Which is working fine in unobfuscated build, But not catching exception in obfuscated build.

I am using proguard-maven-plugin

try {
  ...
} catch (ServletException | IOException e){
  ...
}

Is there any proguard rule i need to add for this?

Because its working fine When i write my code as

try {
  ...
} catch (ServletException e) {
  ...
} catch (IOException e) {
  ...
}
like image 940
Gaurav Avatar asked Nov 08 '22 14:11

Gaurav


1 Answers

There can be a bug from Proguard. https://sourceforge.net/p/proguard/bugs/607/ Unfortunately no solution was provided. I suggest to avoid multi-catch until it's not fixed if possible.

like image 86
fhery021 Avatar answered Nov 15 '22 11:11

fhery021