exception handling in servlets
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   bitap_raj
Posted On:   Wednesday, June 11, 2003 01:50 AM

I have a method which logs all exceptions into a databse table.
I m using an exception handling strategy where,all exceptions raised while accessing database are thrown as customised exception into a outer loop where they are handled(a error page thrown).Now,I have to place this method
for logging exception messages into database somewhere.
The issue is where do i place it,at the outer loop or in a finally block?
also how do i handle the exception raised by this method itself?

Re: exception handling in servlets

Posted By:   Nick_Maiorano  
Posted On:   Wednesday, June 11, 2003 06:52 PM

Bitap,



Can you explain what you mean by the outer loop? Can you give several lines of code showing this?



As for handling the exception thrown by method that logs to the database, at minimum, you must throw the error to System.err.println(). There are other things you can do but it depends on how critical your app is to the business.

About | Sitemap | Contact