Separate catch blocks for exceptions in Handler.java