corso https://vola.udemy.com/course/php-mvc-from-scratch/learn/lecture/40931984#overview
filippo.bertilotti
2024-05-23 85f6ec1bc8f094e769835e9836b9fab7fb9e6ace
src/Framework/ErrorHandler.php
@@ -18,7 +18,6 @@
            throw new ErrorException($errstr,0, $errno, $errfile, $errline);
    }
    public static function handleException(Throwable $exception) {
        static $show_errors = true;
    
        if($exception instanceof Exceptions\PageNotFoundException) {
            http_response_code(404);
@@ -28,12 +27,12 @@
            $template = "500.php";
        }
    
        if($show_errors) {
        if($_ENV["SHOW_ERRORS"]) {
            ini_set("display_errors", "1");
        }else{
            ini_set("display_errors","0");
            ini_set("log_errors","1");
            require "views/$template";
            require dirname(__DIR__,2) . "/views/$template";
        }
    
        throw $exception;