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:
15: use Cake\Core\Exception\Exception;
16:
17: /**
18: * Represents a fatal error
19: */
20: class FatalErrorException extends Exception
21: {
22: /**
23: * Constructor
24: *
25: * @param string $message Message string.
26: * @param int|null $code Code.
27: * @param string|null $file File name.
28: * @param int|null $line Line number.
29: * @param \Exception|null $previous The previous exception.
30: */
31: public function __construct($message, $code = null, $file = null, $line = null, $previous = null)
32: {
33: parent::__construct($message, $code, $previous);
34: if ($file) {
35: $this->file = $file;
36: }
37: if ($line) {
38: $this->line = $line;
39: }
40: }
41: }
42: