Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connection conn = null;
- try {
- conn = openConnection();
- // do stuff
- exceprionThrower(); // throws SQLException()
- }
- finally {
- try {
- if (conn != null)
- conn.close();
- }
- catch(SomeException e) {} // nothing we can do
- // "swallow" SomeException exception so it doesnt get thrown out
- // the method throws SQLException() as expected
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement