Menu

#5 Return clause in finally block

open
nobody
None
5
2009-07-15
2009-07-15
Anonymous
No

In the insert method the return clause is in the finally block. If a exception is throwed, it is lost.
See http://weblogs.java.net/blog/staufferjames/archive/2007/06/_dont_return_in.html
I consider that the return clause should be in the last part of the try block, following "con.commit();"
Sorry for my english. I am from Uruguay in South America and I speak spanish.
Thanks

Discussion


Log in to post a comment.