public ExpectedInnerExceptionAttribute(Type exceptionType, Type innerExceptionType)
{
if (exceptionType == null)
{
throw new ArgumentNullException("exceptionType");
}
if (innerExceptionType == null)
{
throw new ArgumentNullException("innerExceptionType");
}
if (!typeof(Exception).IsAssignableFrom(exceptionType))
{
throw new ArgumentException("Expected exception type must derive from exception.", "exceptionType");
}
if (!typeof(Exception).IsAssignableFrom(innerExceptionType))
{
throw new ArgumentException("Expected inner exception type must derive from exception.", "innerExceptionType");
}
ExceptionType = exceptionType;
InnerExceptionType = innerExceptionType;
}