Alan Ezust wrote:
On 11/17/06,
<> wrote:
Revision: 8095

Author:   blueyed
Date:     2006-11-17 06:37:05 -0800 (Fri, 17 Nov 2006)

Log Message:
Catch exception with empty Update table; please check, because there is probably a cleaner solution

+                               try
+                               {
+                                       // TODO: blueyed> this throws an exception with an empty "Update" table. Please check, if this is the right fix.
+                                       table.setRowSelectionInterval(0,0);
+                               }
+                               catch(Exception e) {}

Please do not have a catch (Exception e) {} anywhere in the code.
If there is a specific exception you are expecting, please put the
proper type in the catch parameter.
Furthermore, don't catch an exception if you are able to prevent that it is thrown through some check before. Catching an exception that is likely to be raised needs the exception object to be constructed and this costs time and ressources. A simple check though, like "if (table.getRowCount() > 0) { table.setRowSelectionInterval(0,0); }" is the very more clean approach and the more performant approach. I don't know if this exact code-snippet applies here, I don't know the context atm.