I have a custom exception
class MyException: System.Runtime.InteropServices.COMException
{
.....
}
and code like this
try
{
.....
}
catch(MyException ex)
{
//Some code
}
catch(Exception ex)
{
// Other code
}
I put a break point in the MyException catch block, and another one in
the Exception catch block. I am running into a situation where the
debugger stops in the Exception catch block with out ever stopping in
the MyException catch. I check the type of the exception in the Locals
window only to find that it's of type MyException. I'm pretty sure that
it's supposed to be caught in the first catch not the second. What
could be going wrong?