using System;
namespace DotSDL.Exceptions {
///
/// This is thrown when an invalid type is used for
/// a genetic class or method.
///
public class InvalidTypeException : Exception {
///
/// Initializes an .
///
/// The class or method that was called.
/// The invalid type that was passed.
/// A message that should be appended to the base message.
public InvalidTypeException(string objectName, Type invalidType, string message = "")
: base($"{objectName} cannot accept the type {nameof(invalidType)}" + message != "" ? $" ({message})" : "") { }
}
}