From: Roland Haeder Date: Mon, 24 Aug 2015 11:27:44 +0000 (+0200) Subject: Handle thrown exception here X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=53a55832870b0b741ec713c78b630b54570f5dbb;p=jcore.git Handle thrown exception here Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jcore/model/swing/contact/ContactTableModel.java b/src/org/mxchange/jcore/model/swing/contact/ContactTableModel.java index 39ae1de..1ed727d 100644 --- a/src/org/mxchange/jcore/model/swing/contact/ContactTableModel.java +++ b/src/org/mxchange/jcore/model/swing/contact/ContactTableModel.java @@ -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