throwing exception in try block in c# - debugging by attaching nunit to VSS debugger
<p>I am running this test case using NUNIT and attaching the NUNIT to the Visual studio debugger (Debug ---> Attach to Process ---> Select nunit.exe).</p>

<p>I was expecting the statement "throw new Exception("Exception 1 occured!");"to move the control into the catch block but 
the control does not jump to the "catch" but instead jumps to method2().</p>

<p>When I just run the nunit test case without attaching nunit.exe to the Visual Studio debugger the code behaves normally.</p>

<pre><code>public void test()
{
try
            {
                method1();
                if (condition1)
                {
                    throw new Exception("Exception 1 occured!");
                }

                method2();  
                if (condition2)
                {
                    throw new Exception("Exception 2 occured!");
                }

                method3();
                if (condition3)
                {
                    throw new Exception("Exception 3 occured!");
                }

            }
            catch (Exception Ex)  &lt;---- Exceptions thrown above are caught here
            {
                logMessage(E.Message);
                throw;                  
            }                   
}
</code></pre>
