Skip to content

Commit 1e1f4d1

Browse files
committed
remove unused try catch
1 parent 8d67002 commit 1e1f4d1

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/main/java/scorekeep/GameModel.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,12 @@ public class GameModel {
2121
private SessionModel sessionModel = new SessionModel();
2222

2323
public void saveGame(Game game) throws SessionNotFoundException {
24-
try {
25-
// check session
26-
String sessionId = game.getSession();
27-
if (sessionModel.loadSession(sessionId) == null ) {
28-
throw new SessionNotFoundException(sessionId);
29-
}
30-
mapper.save(game);
31-
} catch (Exception e) {
32-
throw e;
24+
// check session
25+
String sessionId = game.getSession();
26+
if (sessionModel.loadSession(sessionId) == null ) {
27+
throw new SessionNotFoundException(sessionId);
3328
}
29+
mapper.save(game);
3430
}
3531

3632
public Game loadGame(String gameId) throws GameNotFoundException {

0 commit comments

Comments
 (0)