/** * @param string $argumentName name of argument in question * @param array $details list of specific reasons the argument value is invalid in this instance * @param string $resolution details of how to fix the invalid value used in this instance * @param string $message * @param int $code * @param Exception $previous */ public function __construct($argumentName, array $details, $resolution, $message = "", $code = 0, Exception $previous = null) { $this->argument = $argumentName; $this->constructException($details); $this->resolution = $resolution; parent::__construct($message, $code, $previous); }
/** * @param string $argumentName name of argument in question * @param mixed $validArgumentValue a value of the data type valid for the argument - its data type will be determined automatically * @param mixed $givenArgumentValue the value given for the argument in this instance - its data type will be determined automatically * @param string $message * @param int $code * @param Exception $previous */ public function __construct($argumentName, $validArgumentValue, $givenArgumentValue, $message = "", $code = 0, Exception $previous = null) { // Automatically determine correct and given data types for argument $this->argument = $argumentName; $this->argumentType = gettype($validArgumentValue); $this->argumentValueType = gettype($givenArgumentValue); $this->constructException(); parent::__construct($message, $code, $previous); }