mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Error Handler Progress
This commit is contained in:
1 parent
abff057943
commit
0f51826d3f
2 files changed
+9
-10
No files matched your search
@@ -32,6 +32,15 @@ class Autoloader {
|
||||
|
||||
spl_autoload_register("Autoloader::ClassLoader");
|
||||
Autoloader::setRoot('/var/www/dev.steelants.cz/vasek/home-update/');
|
||||
|
||||
class ErrorHandler {
|
||||
static function exception($exception){
|
||||
error_log($exception);
|
||||
header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
|
||||
echo '<h1>Oops!</h1><p>Something went wrong!</p>';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
set_exception_handler("ErrorHandler::exception");
|
||||
|
||||
//Debug
|
||||
|
||||
Reference in new issue
Block a user