Closing database connections and exception handling
From: Andrea Desole (_REMOVE_THIS_desole_at_gmx.net)
Date: 03/31/04
- Previous message: Robert Colquhoun: "Re: Eclipse, Java 1.5 and StringBuffer"
- Next in thread: Sudsy: "Re: Closing database connections and exception handling"
- Reply: Sudsy: "Re: Closing database connections and exception handling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 31 Mar 2004 09:27:17 +0200
Hi,
I just had a discussion with a couple of people concerning how to handle
exceptions that occur in the close method of connection and statements.
People usually say: it's an exception in the close method, that means
you have already done what you had to do, there is really nothing more
to do with this exception.
My point is: if it is an exception, and shouldn't occur, it must be
handled/propagated/notified, because that means that something goes
wrong. Since the code to do that is not really much, I don't see why I
can't be safer; you never know why an exception is thrown.
I'm curious to hear some opinions.
Thanks
Andrea
- Previous message: Robert Colquhoun: "Re: Eclipse, Java 1.5 and StringBuffer"
- Next in thread: Sudsy: "Re: Closing database connections and exception handling"
- Reply: Sudsy: "Re: Closing database connections and exception handling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|