UnknownUnitException.php 645 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * This file is part of the Carbon package.
  4. *
  5. * (c) Brian Nesbitt <brian@nesbot.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Carbon\Exceptions;
  11. use Exception;
  12. class UnknownUnitException extends UnitException
  13. {
  14. /**
  15. * Constructor.
  16. *
  17. * @param string $unit
  18. * @param int $code
  19. * @param Exception|null $previous
  20. */
  21. public function __construct($unit, $code = 0, Exception $previous = null)
  22. {
  23. parent::__construct("Unknown unit '$unit'.", $code, $previous);
  24. }
  25. }