views:

216

answers:

4

Hi all, I know how to use try...catch block in c#. Also know why it is using. but what is exact meaning of Exception handling ? see once i write the try {}.. Catch{} i handled null exception then what should happen? what are the standard for exception handling. means what should happen is normally expected if exception occur ?

A: 

Wikipedia says "Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution."

After caching an exception, if program can recover from the exception condition it’s safe to do it. Otherwise you need to log an informative error massage and then you should stop the program.

Upul
A: 

This link will help http://www.codeproject.com/KB/architecture/exceptionbestpractices.aspx

Adeel
+2  A: 

Firstly, do a search for C# exception handling on a good search engine. This will yield lots of good tutorials and results.

If you have a specific question on a specific exception handling scenario that you need to deal with can you post more information?

Best,
Mark

Mark Cooper
+1  A: 

The try, throw, and catch statements implement exception handling. With C++ exception handling, your program can communicate unexpected events to a higher execution context that is better able to recover from such abnormal events. For more details log on to http://www.tictacdo.com/