[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - wizards/com

Lionel Elie Mamane lionel at mamane.lu
Thu Jul 4 05:40:07 PDT 2013


 wizards/com/sun/star/wizards/db/DBMetaData.java |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 534c879c06a00b563da3bf0e1727c30e064b1d39
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Jul 3 18:04:28 2013 +0200

    handle non-wrapped SQLException
    
    This happens e.g. when the user types a forbidden name for the query
    (e.g. containing '/'
    
    Also uniformise Logger usage instead of exception.printStackTrace
    
    Change-Id: I29b14b65dae487e0eb61b90ceba968142981e755
    Reviewed-on: https://gerrit.libreoffice.org/4708
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java
index 39c4f84..a75009c 100644
--- a/wizards/com/sun/star/wizards/db/DBMetaData.java
+++ b/wizards/com/sun/star/wizards/db/DBMetaData.java
@@ -856,11 +856,12 @@ public class DBMetaData
                 callSQLErrorMessageDialog(sqlError, null);
                 return false;
             }
-            exception.printStackTrace(System.err);
+            Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, exception );
         }
         catch (SQLException e)
         {
-            Logger.getLogger( DBMetaData.class.getName() ).log( Level.SEVERE, null, e );
+            callSQLErrorMessageDialog(e, null);
+            return false;
         }
         catch (Exception e)
         {


More information about the Libreoffice-commits mailing list