From 53a55832870b0b741ec713c78b630b54570f5dbb Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 24 Aug 2015 13:27:44 +0200 Subject: [PATCH] =?utf8?q?Handle=20thrown=20exception=20here=20Signed-off-?= =?utf8?q?by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../model/swing/contact/ContactTableModel.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 -- 2.39.5