diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-03 18:04:28 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-03 18:14:52 +0200 |
commit | 7b957555d0027e9e7eeb8f31dcba6aa6408f4e16 (patch) | |
tree | 263499716f687d7927845cbd4066756c9c860bce /wizards | |
parent | 36c64c875f5819bf5ada2bb657c490441bc24644 (diff) |
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
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/db/DBMetaData.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wizards/com/sun/star/wizards/db/DBMetaData.java b/wizards/com/sun/star/wizards/db/DBMetaData.java index 39c4f84f7871..a75009cff511 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) { |