[hg] main-silver: Catch also RuntimeException when checking supp...

  • From: Jaroslav Havlin < >
  • To:
  • Subject: [hg] main-silver: Catch also RuntimeException when checking supp...
  • Date: Tue, 11 Jun 2013 12:05:47 -0700

changeset 1a7d8262b850 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/1a7d8262b850
description:
        Catch also RuntimeException when checking support for multiple 
resultsets

        Recommendation by Matthias42.
        (Module source level changed to 1.7.)

diffstat:

 db.dataview/nbproject/project.properties                                     
   |  2 +-
 
db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
 |  5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diffs (26 lines):

diff --git a/db.dataview/nbproject/project.properties 
b/db.dataview/nbproject/project.properties
--- a/db.dataview/nbproject/project.properties
+++ b/db.dataview/nbproject/project.properties
@@ -1,4 +1,4 @@
-javac.source=1.6
+javac.source=1.7
 javac.compilerargs=-Xlint -Xlint:-serial
 test.unit.cp.extra=\
         ${basedir}/test/unit/data/etc/axiondb.jar
diff --git 
a/db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
 
b/db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
--- 
a/db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
+++ 
b/db.dataview/src/org/netbeans/modules/db/dataview/output/SQLExecutionHelper.java
@@ -266,9 +266,12 @@
             private void checkSupportForMultipleResultSets(Connection conn) {
                 try {
                     supportesMultipleResultSets = 
conn.getMetaData().supportsMultipleResultSets();
-                } catch (SQLException ex) {
+                } catch (SQLException | RuntimeException e) {
                     LOGGER.log(Level.INFO, "Database driver throws exception 
"  //NOI18N
                             + "when checking for multiple resultset 
support."); //NOI18N
+                    if (LOGGER.isLoggable(Level.FINE)) {
+                        LOGGER.log(Level.FINE, null, ex);
+                    }
                 }
             }
         }

[hg] main-silver: Catch also RuntimeException when checking supp...

Jaroslav Havlin 06/11/2013

Project Features

About this Project

DB was started in November 2009, is owned by Antonin Nebuzelsky, and has 113 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close