diff --git a/app/Bootstrap.php b/app/Bootstrap.php index 5270f79..60998b0 100644 --- a/app/Bootstrap.php +++ b/app/Bootstrap.php @@ -32,6 +32,7 @@ class Autoloader { spl_autoload_register("Autoloader::ClassLoader"); Autoloader::setRoot('/var/www/dev.steelants.cz/vasek/home-update/'); +set_exception_handler("ErrorHandler::exception"); //Debug error_reporting(E_ALL); diff --git a/library/ErrorHandler.php b/library/ErrorHandler.php index a7145f8..96db7d8 100644 --- a/library/ErrorHandler.php +++ b/library/ErrorHandler.php @@ -3,19 +3,8 @@ class ErrorHandler { static function exception($exception){ error_log($exception); header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500); - echo ' -
-Something went wrong!
- - '; + echo 'Something went wrong!
'; exit; } } -set_exception_handler('ErrorHandler::exception'); \ No newline at end of file