K
kaeli
Hey all,
At the moment, I have a web application that has an error page that catches
all my errors. This works great. When any of my classes throws an error, the
app forwards on to error.jsp so users can see the error message.
The thing is, classes that throw errors when DB connections, files, and
whatnot are open would get messed up if I didn't close things. So what I did
was to use a try/catch/finally block so that I could close things in the
finally block and just re-threw the exception.
Is there a more elegant way to do this?
I mean, catching errors just to throw them again is rather silly.
But if it's the only way I get a finally, it'll have to do.
The classes in question are beans that are used in a JSP intranet app if it
matters or helps. No struts, I'm afraid, nor Tomcat.
--
--
~kaeli~
She was engaged to a boyfriend with a wooden leg but broke
it off.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
At the moment, I have a web application that has an error page that catches
all my errors. This works great. When any of my classes throws an error, the
app forwards on to error.jsp so users can see the error message.
The thing is, classes that throw errors when DB connections, files, and
whatnot are open would get messed up if I didn't close things. So what I did
was to use a try/catch/finally block so that I could close things in the
finally block and just re-threw the exception.
Is there a more elegant way to do this?
I mean, catching errors just to throw them again is rather silly.
But if it's the only way I get a finally, it'll have to do.
The classes in question are beans that are used in a JSP intranet app if it
matters or helps. No struts, I'm afraid, nor Tomcat.
--
--
~kaeli~
She was engaged to a boyfriend with a wooden leg but broke
it off.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace