]> git.mxchange.org Git - jbonuscard-lib.git/commitdiff
replaced with multi-catch
authorRoland Haeder <roland@mxchange.org>
Tue, 11 Aug 2015 12:25:04 +0000 (14:25 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 11 Aug 2015 12:25:04 +0000 (14:25 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java

index 97593c63b880bce0b96f052c36b4c3abeff53445..6fb08169feae3b14a3a8743e16f62b1d5f176acf 100644 (file)
@@ -75,12 +75,9 @@ public class AddressbookContactDatabaseFrontend extends BaseDatabaseFrontend imp
                try {
                        // Initalize backend
                        this.initBackend();
-               } catch (final UnsupportedDatabaseBackendException ex) {
+               } catch (final UnsupportedDatabaseBackendException | SQLException ex) {
                        // Abort program
                        this.abortProgramWithException(ex);
-               } catch (final SQLException ex) {
-                       // Abort here
-                       this.abortProgramWithException(ex);
                }
        }
 
@@ -110,10 +107,7 @@ public class AddressbookContactDatabaseFrontend extends BaseDatabaseFrontend imp
 
                        // Then add it
                        this.getBackend().store((Storeable) contact);
-               } catch (final IOException ex) {
-                       // Abort here
-                       this.abortProgramWithException(ex);
-               } catch (final BadTokenException ex) {
+               } catch (final IOException | BadTokenException ex) {
                        // Abort here
                        this.abortProgramWithException(ex);
                }