Let us assume that a particular Exception "SomeException
" is part of the exception stack,
so let us assume ex.InnerException.InnerException.InnerException
is of type "SomeException
"
Is there any built-in API in C# which will try to locate a given exception type in exception stack?
Example:
SomeException someExp = exp.LocateExceptionInStack(typeof(SomeException));