Nesting of Exceptions try catch blocks.

suggest change

One is able to nest one exception / try catch block inside the other.

This way one can manage small blocks of code which are capable of working without disrupting your whole mechanism.

try 
{
		// some code here
    try 
    {
        // some thing which throws an exception. For Eg : divide by 0
    }
    catch (DivideByZeroException dzEx)
    {
        // handle here only this exception
        // throw from here will be passed on to the parent catch block
    }
    finally
    {
        //any thing to do after it is done.
    }
	  // resume from here & proceed as normal; 
}
catch (Exception e)
{
    // handle here
}

Note: Avoid Swallowing Exceptions when throwing to the parent catch block

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Exception Handling:
* Nesting of Exceptions try catch blocks.

Table Of Contents
17 Regex
19 Arrays
21 Enum
22 Tuples
24 GUID
27 Looping
36 Casting
46 Methods
74 Exception Handling
88 Events
92 Structs
104 Indexer
106 Stream
107 Timers
109 Threading
127 Caching
135 Pointers
147 C# Script