mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 12:32:42 +00:00
Added a handler for fatal errors, showing internal server error page when debug is disabled or a custom fatal error page when enabled.
This commit is contained in:
parent
f677bfea7d
commit
440f0c38eb
5 changed files with 105 additions and 1 deletions
|
@ -517,3 +517,30 @@ class XmlException extends CakeException {
|
|||
*/
|
||||
class ConsoleException extends CakeException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a fatal error
|
||||
*
|
||||
* @package Cake.Error
|
||||
*/
|
||||
class FatalErrorException extends CakeException {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $message
|
||||
* @param integer $code
|
||||
* @param string $file
|
||||
* @param integer $line
|
||||
*/
|
||||
public function __construct($message, $code = 500, $file = null, $line = null) {
|
||||
parent::__construct($message, $code);
|
||||
if ($file) {
|
||||
$this->file = $file;
|
||||
}
|
||||
if ($line) {
|
||||
$this->line = $line;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue