Ok, that's probably not what you were after.... On Aug 18, 11:34 am, Christian Catchpole <christ...@catchpole.net> wrote: > Go the "finally".. (there is that risk of the original exception > being lost and knock on ones cropping up) > > PreparedStatement ps = connection.prepareStatement(sql); > try { > ResultSet resultSet = ps.executeQuery(); > try { > while (resultSet.next()) { > // stuff > } > } finally { > resultSet.close(); > } > } finally { > ps.close(); > } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
- [The Java Posse] Re: How do YOU handle Exceptions? Peter Becker
- [The Java Posse] Re: How do YOU handle Exceptions... Jess Holle
- [The Java Posse] Re: How do YOU handle Except... Peter Becker
- [The Java Posse] Re: How do YOU handle Ex... Reinier Zwitserloot
- [The Java Posse] Re: How do YOU handle Ex... Jess Holle
- [The Java Posse] Re: How do YOU handl... Peter Becker
- [The Java Posse] Re: How do YOU ... Casper Bang
- [The Java Posse] Re: How do ... Michael Neale
- [The Java Posse] Re: How do ... phil swenson
- [The Java Posse] Re: How do ... Christian Catchpole
- [The Java Posse] Re: How do ... Christian Catchpole
- [The Java Posse] Re: How do ... Casper Bang
- [The Java Posse] Re: How do ... Christian Catchpole
- [The Java Posse] Re: How do ... Michael Neale
- [The Java Posse] Re: How do ... phil swenson
- [The Java Posse] Re: How do ... Peter Becker
- [The Java Posse] Re: How do ... Reinier Zwitserloot
- [The Java Posse] Re: How do ... Peter Becker
- [The Java Posse] Re: How do ... Michael Neale
- [The Java Posse] Re: How do ... Viktor Klang
- [The Java Posse] Re: How do ... Viktor Klang