PHP_SMART_HOME_V3/library/ErrorHandler.php
2020-04-25 10:20:47 +02:00

10 lines
271 B
PHP

<?php
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;
}
}