]> git.mxchange.org Git - jcore.git/commitdiff
Handle thrown exception here
authorRoland Haeder <roland@mxchange.org>
Mon, 24 Aug 2015 11:27:44 +0000 (13:27 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 24 Aug 2015 11:27:44 +0000 (13:27 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcore/model/swing/contact/ContactTableModel.java

index 39ae1deee3c3808a4d423f701c1b6f435490243c..1ed727d01e4f5763decd63d3e693bb2ab16ad203 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jcore.model.swing.contact;
 
+import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.text.MessageFormat;
 import javax.swing.table.TableModel;
@@ -78,8 +79,16 @@ public class ContactTableModel extends BaseModel implements TableModel {
                // Get manager
                ManageableDatabase manager = (ManageableDatabase) this.getClient().getManager();
 
-               // Deligate this call to contact manager
-               return manager.size();
+               try {
+                       // Deligate this call to contact manager
+                       return manager.size();
+               } catch (final IOException ex) {
+                       // Log warning
+                       this.getLogger().catching(ex);
+
+                       // Return zero
+                       return 0;
+               }
        }
 
        @Override