error handling in c#.net with examples

Posted by Krishnamanohar under C# on 4/22/2013 | Points: 10 | Views : 1293 | Status : [Member] | Replies : 2
Hi Experts.
i have a class with 1000 methods .then how to implement the exception handlig with out using try ,catch for every method?
post some examples with code pls
Thanks in advance
Krish




Responses

Posted by: Prabhukiran345 on: 4/22/2013 [Member] Starter | Points: 25

Up
0
Down
public class MyUncaughtExceptionHandler : Thread.UncaughtExceptionHandler {
public void uncaughtException(Thread t, Throwable e) {
// Write the custom logic here
}
}

Hope this wil help you.Please mark as answer..

Thanks,
Prabhu Kiran Bommareddy

Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gaur1982 on: 4/23/2013 [Member] Starter | Points: 25

Up
0
Down
Check these URLs
1. Exception Handling in .NET : http://planetofcoders.com/exception-handling-net/
2. Exception classes in .NET : http://planetofcoders.com/exception-classes-net/

Gaurav Agrawal
http://www.planetofcoders.com/

Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response