File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Another code snippet about SQLException