Merge pull request #4991 from lor6/BAEL-8219

Bael 8219
This commit is contained in:
Loredana Crusoveanu
2018-08-18 15:53:59 +03:00
committed by GitHub
3 changed files with 16 additions and 9 deletions
@@ -25,7 +25,11 @@ public class Exceptions {
}
public List<Player> loadAllPlayers(String playersFile) throws IOException{
throw new IOException();
try {
throw new IOException();
} catch(IOException ex) {
throw new IllegalStateException();
}
}
public int getPlayerScoreThrows(String playerFile) throws FileNotFoundException {
@@ -160,7 +164,13 @@ public class Exceptions {
}
public void throwAsGotoAntiPattern() throws MyException {
throw new MyException();
try {
// bunch of code
throw new MyException();
// second bunch of code
} catch ( MyException e ) {
// third bunch of code
}
}
public int getPlayerScoreSwallowingExceptionAntiPattern(String playerFile) {