DbVis Software
Home
Solutions
Forums
Users Guide
Release Notes
Download
Welcome
Login
Sign up
How can we help you today?
Enter your search term here...
Search
Login
or
Signup
to submit a new ticket
Check ticket status
Start a new topic
Discussions
DbVisualizer Forums
Feature Requests
catch all of sql exceptions
a
anonymous
started a topic
over 17 years ago
[This topic is migrated from our old forums. The original author name has been removed
]
use this code to catch all of sql exceptions:
} catch (Throwable e) {
if (e instanceof SQLException) {
printSQLError((SQLException) e);
} else {
e.printStackTrace();
}
}
static void printSQLError(SQLException e) {
while (e != null) {
System.out.println(e.toString());
e = e.getNextException();
}
}
source: Apache Derby sapmles in jdk1.6\db\demo\programs\simple\SimpleApp.java
1 Comment
Roger Bjärevall
said
over 17 years ago
[This reply is migrated from our old forums.
]
Re: catch all of sql exceptions
Hi, Next version will show nested SQLExceptions. Thanks! Regards Roger
Comments to this discussion are now closed!
More topics in
Feature Requests
Support for column descriptions
Database Structure Comparison
integrated ssh tunneling ?
Save columns in export data.
browsing through database links ?
could a pivot function be added ?
enable use of bind variables
Sequences
Apply NLS database settings to numeric data types
Variables in Connection settings
See all 621 topics
anonymous
} catch (Throwable e) {
if (e instanceof SQLException) {
printSQLError((SQLException) e);
} else {
e.printStackTrace();
}
}
static void printSQLError(SQLException e) {
while (e != null) {
System.out.println(e.toString());
e = e.getNextException();
}
}
source: Apache Derby sapmles in jdk1.6\db\demo\programs\simple\SimpleApp.java