aspose file tools*
The moose likes JDBC and the fly likes Another code snippet about SQLException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Another code snippet about SQLException" Watch "Another code snippet about SQLException" New topic
Author

Another code snippet about SQLException

Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
Hi, here is another code snippet about SQLException that I am not sure about:
public void close() throws SQLException{
try{
connection.close();
}
catch(SQLException e){
throw e;
}
}
Isn't the exception handling in this method redundant?
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
yes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Another code snippet about SQLException
 
Similar Threads
nullpointerexception
Exception Question from Enthuware
SQLException
getRootCause()
clob variable: java.lang.NullPointerException