public static function exceptionHandler($exception) 
    {
        $message = $exception->getMessage();
        $code = $exception->getCode();
        $file = $exception->getFile();
        $line = $exception->getLine();
        $context = $exception->getTraceAsString();

        self::logError('Exception thrown: ' . $message . ' | ' . $code, null, $file, $line);
        
        // And return a 500 because this error was fatal
        self::http_error('500');
    }