private int getDepth( Type exceptionType, int depth )
{
if ( ( exceptionType.Name.IndexOf( ExceptionName ) != -1 ) || ( exceptionType.FullName.IndexOf( ExceptionName ) != -1 ) )
{
return depth;
}
if ( exceptionType == typeof(Exception))
{
return -1;
}
return getDepth( exceptionType.BaseType, depth + 1 );
}
}