Error Handler Progress
This commit is contained in:
parent
79016fed87
commit
abff057943
@ -32,6 +32,7 @@ class Autoloader {
|
|||||||
|
|
||||||
spl_autoload_register("Autoloader::ClassLoader");
|
spl_autoload_register("Autoloader::ClassLoader");
|
||||||
Autoloader::setRoot('/var/www/dev.steelants.cz/vasek/home-update/');
|
Autoloader::setRoot('/var/www/dev.steelants.cz/vasek/home-update/');
|
||||||
|
set_exception_handler("ErrorHandler::exception");
|
||||||
|
|
||||||
//Debug
|
//Debug
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
|
@ -3,19 +3,8 @@ class ErrorHandler {
|
|||||||
static function exception($exception){
|
static function exception($exception){
|
||||||
error_log($exception);
|
error_log($exception);
|
||||||
header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
|
header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
|
||||||
echo '<html>
|
echo '<h1>Oops!</h1><p>Something went wrong!</p>';
|
||||||
<head>
|
|
||||||
<title>Error!</title>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Oops!</h1>
|
|
||||||
<p>Something went wrong!</p>
|
|
||||||
</body>
|
|
||||||
</html>';
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
set_exception_handler('ErrorHandler::exception');
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user