4 * This file is part of the Carbon package.
6 * (c) Brian Nesbitt <brian@nesbot.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Carbon\Exceptions
;
15 use InvalidArgumentException
;
17 class InvalidDateException
extends InvalidArgumentException
36 * @param string $field
39 * @param \Exception|null $previous
41 public function __construct($field, $value, $code = 0, Exception
$previous = null)
43 $this->field
= $field;
44 $this->value
= $value;
45 parent
::__construct($field.' : '.$value.' is not a valid value.', $code, $previous);
49 * Get the invalid field.
53 public function getField()
59 * Get the invalid value.
63 public function getValue()