Aggiornato Composer
This commit is contained in:
@@ -11,19 +11,38 @@
|
||||
|
||||
namespace Carbon\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
class UnknownUnitException extends UnitException
|
||||
{
|
||||
/**
|
||||
* The unit.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $unit;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $unit
|
||||
* @param int $code
|
||||
* @param Exception|null $previous
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($unit, $code = 0, Exception $previous = null)
|
||||
public function __construct($unit, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
|
||||
parent::__construct("Unknown unit '$unit'.", $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the unit.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUnit(): string
|
||||
{
|
||||
return $this->unit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user