This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Hello Listers, I have a question about how to "design error handling" for a generic class that accesses a database. I want to use try/catch/finally because if there is a problem during the flow, I would like to disconnect and destroy the connection (so that's why I don't want to declare a "throws") But at the same time, after closing the connection in the finally clause, I also want my catch statement to throw an exception, so the calling application knows something bad happened. Should I create a custom exception class (extending SQLException) and throw it in my catch clause? Thanks for your time.