Hi
Pls give me tips on doing error handling and sending mails about errors to various persons .
lot of thanx
Ashutosh
-
Error Handling and sending mails(urgent) (6 messages)
- Posted by: ashutosh kumar
- Posted on: August 02 2003 02:41 EDT
Threaded Messages (6)
- Elobrate your question by Raheel haider on August 02 2003 03:27 EDT
- error handling and crash recovery by ashutosh kumar on August 02 2003 05:12 EDT
-
error handling and crash recovery by Chetans on August 04 2003 07:16 EDT
- error handling and sendig mails by ashutosh kumar on August 04 2003 11:06 EDT
-
error handling by ashutosh kumar on August 05 2003 01:05 EDT
- error handling by Chetans on August 05 2003 08:44 EDT
-
error handling and crash recovery by Chetans on August 04 2003 07:16 EDT
- error handling and crash recovery by ashutosh kumar on August 02 2003 05:12 EDT
-
Elobrate your question[ Go to top ]
- Posted by: Raheel haider
- Posted on: August 02 2003 03:27 EDT
- in response to ashutosh kumar
Hi
> Pls give me tips on doing error handling and sending mails about errors to various persons .
> lot of thanx
> Ashutosh
Hi please elobrate your question, from current message i think that you are getting problem in sending mail -
error handling and crash recovery[ Go to top ]
- Posted by: ashutosh kumar
- Posted on: August 02 2003 05:12 EDT
- in response to Raheel haider
No its not problem of sending mails. I want to know a good design for error handling and also about crash recovery for weblogic integration server.
regds
ashutosh -
error handling and crash recovery[ Go to top ]
- Posted by: Chetans
- Posted on: August 04 2003 07:16 EDT
- in response to ashutosh kumar
I guess you can define your own exception class derived from Exception. That way you can have some additional methods in ur exception to handle ur specific requirement.
My general way will be to send mails at the end of the exception hirarchy.
i.e. all exception travel upward towards the main calling function. make sure that your customize class has a method to send error report via mails.
or write a helper class which will send mails and take your exception object as a parameter.
This is pretty common practice
Hope this helps
Regards
Chetan -
error handling and sendig mails[ Go to top ]
- Posted by: ashutosh kumar
- Posted on: August 04 2003 11:06 EDT
- in response to Chetans
can u send me lld for it.it will help me.
thanx
Ashutosh -
error handling[ Go to top ]
- Posted by: ashutosh kumar
- Posted on: August 05 2003 01:05 EDT
- in response to Chetans
can u eloborate me how all exceptions travel upwards.can u send me a lld for it on kumar dot ashutosh at seepz dot tcs dot co.in -
error handling[ Go to top ]
- Posted by: Chetans
- Posted on: August 05 2003 08:44 EDT
- in response to ashutosh kumar
ashutosh,
exception traveling upward is a basic oop funda. I guess you know that, but I might have put it in such a way that you thought I am talking about something else.
ok so say ur servlet makes a call to some helper class and inter the helper class calls other class where the exception is happening,
ServletCall - > helper one-> helper two.
now helper two has caught IOException in ur helpter two catch block
instanciate ur custom exception with ur business domain related message.
and throw the exception. offcourse ur helper two method need to declare throws custom exception in method signature.
how u r gonna catch custom exception in ur servletcall
and once u have the exception object u can use the exception.getMessage to get ur business domain related message which was populated at helper 2 level.
sorry for later reply, didnt see that u have posted some queries.
hope this helps
Regards
Chetan