FatalErrorException.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  10. * @since 3.0.0
  11. * @license https://opensource.org/licenses/mit-license.php MIT License
  12. */
  13. namespace Cake\Error;
  14. use Cake\Core\Exception\Exception;
  15. /**
  16. * Represents a fatal error
  17. */
  18. class FatalErrorException extends Exception
  19. {
  20. /**
  21. * Constructor
  22. *
  23. * @param string $message Message string.
  24. * @param int|null $code Code.
  25. * @param string|null $file File name.
  26. * @param int|null $line Line number.
  27. * @param \Exception|null $previous The previous exception.
  28. */
  29. public function __construct($message, $code = null, $file = null, $line = null, $previous = null)
  30. {
  31. parent::__construct($message, $code, $previous);
  32. if ($file) {
  33. $this->file = $file;
  34. }
  35. if ($line) {
  36. $this->line = $line;
  37. }
  38. }
  39. }