using System;
using System.Collections.Generic;
using System.Reflection;
namespace Chernobyl.Reflection
{
///
/// Thrown when an error involving parameter(s) occurs.
///
public class ParameterException : Exception
{
///
/// Initializes a new instance of the class
/// whose is set to null.
///
/// The error message that explains the reason for
/// the exception.
/// The parameters that are involved in the error.
public ParameterException(string message, IEnumerable parameters)
: this(message, parameters, null)
{ }
///
/// Initializes a new instance of the class.
///
/// The error message that explains the reason for
/// the exception.
/// The parameters that are involved in the error.
/// The exception that is the cause of the
/// current exception, or a null reference (Nothing in Visual Basic) if
/// no inner exception is specified.
public ParameterException(string message,
IEnumerable parameters,
Exception innerException)
: base(message, innerException)
{
Parameters = parameters;
}
///
/// The parameters that are involved in the error.
///
public IEnumerable Parameters { get; private set; }
}
}