Renders the 404 page and halts script execution

@param bool $bLogError Whether to log the error

@return void
326690
public function show_404($sPage = '', $bLogError = true)
    {
        $oErrorHandler = Factory::service('ErrorHandler');
        $oErrorHandler->show404($bLogError);
    }
496882
protected function writeToErrorLog($throwable) {
		$message = 'Wiggum Application Error:' . PHP_EOL;
	
		$message .= $this->renderErrorAsText($throwable);
		while ($throwable = $throwable->getPrevious()) {
			$message .= PHP_EOL . 'Previous error:' . PHP_EOL;
			$message .= $this->renderErrorAsText($throwable);
		}
	
		$this->logError($message);
	}
1291472
private function registerErrorHandler(): void
    {
        $whoops = new Run();
        $whoops->pushHandler(new PrettyPageHandler());
        $whoops->register();

        $this->errorHandler = $whoops;
    }
1022711
public function renderExceptions($flag = null)
    {
        if (null !== $flag)
        {
            $this->_renderExceptions = $flag ? true : false;
        }

        return $this->_renderExceptions;
    }
719742
public function error( $code ) {
		header( $_SERVER["SERVER_PROTOCOL"] . Route::$HttpResponse[ $code ] );

		if ( $this->config->get( "error.$code" ) != '' ) {
			echo $this->render( $this->config->get( 'path.template' ) . '/' . $this->config->get( "error.$code" ) . '.php' );
		} else {
			die( Route::$HttpResponse[ $code ] );
		}

	}
110159
public static function not_found($message = false)
    {
        if(!$message) {
            $message = "Resource not found";
        }

        Response::$status = 404;
        Response::$data = array("error" => $message);
    }
302702
public function fatalHandler() : void
    {
        $errors = error_get_last();
        if (is_array($errors)) {
            $this->setError(
               (int) $errors['type'],
                (string) $errors['message'],
                (string) $errors['file'],
                (int) $errors['line'],
                'FatalErrorException'
            );

            View::render('500.php', (object) $this->errors);

            return;
        }
    }
884208
function errorPage(res, err) {
		if (err) {
			console.error(err.message);
			res.send(err, {'Content-Type': 'text/plain'}, 500);
		} else {
			res.send(404);
		}
	}
631314
public function render( $return = false ) {

		// Get the rendered output.
		$output = $this->get_renderer()->render( $this, true );

		if ( $return ) {
			return $output;
		}

		echo wp_kses( $output, wp_kses_allowed_html( 'post' ) );
	}
1217547
protected function renderError()
    {
        $errMessage = $this->errMessage;
        $errFile = $this->errFile;
        $errLine = $this->errLine;

        \ob_start();
        require __DIR__ . '/templates/trace.error.phtml';

        return \ob_get_clean();
    }
482933
private function renderNotFound(GetResponseForExceptionEvent $event, $template, array $context = [])
    {
        try {
            $html = $this->twig->resolveTemplate($template)->render($context);
            $event->setResponse(new Response($html, Response::HTTP_NOT_FOUND));
        } catch (RuntimeError $e) {
            throw new RuntimeException('Unable to render 404 page!', null, $e);
        }
    }
393274
public function processFailure($url, $error)
    {
        $this->getLogger()->warning(
            'Failed to poll feed',
            array(
                'url' => $url,
                'error' => $error,
            )
        );

        $this->queuePoll($url);
    }
1089412
public function logServerError(Throwable $e)
    {
        /** @var Handle $handle */
        $handle = $this->app->make(Handle::class);

        $handle->renderForConsole(new Output(), $e);

        $handle->report($e);
    }
1192718
protected function renderStatePage(array $data, bool $error = false, ?string $view = null) : View
    {
        return $error ? $this->renderErrorPage($data, $view) : $this->renderSuccessPage($data, $view);
    }
1033660
static function errorHandler($errno, $errstr, $errfile, $errline) {
	    switch ($errno) {
	    case E_USER_ERROR:
	        echo "<b>ERROR:</b> [$errno] $errstr<br>
	        <b>File: </b>$errfile [$errline]<br>
	        Aborting...<br>";
	        exit(1);
	        break;

	    case E_USER_WARNING:
	        echo "<b>WARNING:</b> [$errno] $errstr<br><b>File:</b> $errfile [$errline]";
	        break;

	    case E_USER_NOTICE:
	        echo "<b>NOTICE:</b> [$errno] $errstr<br><b>File:</b> $errfile [$errline]";
	        break;

	    default:
	        echo "<b>Unknown error type:</b> [$errno] $errstr<br><b>File:</b> $errfile [$errline]";
	        break;
	    }

	    /* Don't execute PHP internal error handler */
	    return true;
	}
280918
function Render()
    {
        self::$currentPage = $this->page;
        self::$Title = self::$currentPage->GetTitle();
        self::$Description = self::$currentPage->GetDescription();
        self::$Keywords = self::$currentPage->GetKeywords();
        if ($this->page->GetType() == (string)PageType::NotFound())
        {
            header('HTTP/1.0 404 Not Found');
        }
        else if ($this->page->GetType() !== (string)PageType::Normal())
        {
            throw new \Exception('Internal phine error: not normal page called');
        }
        ob_start();
        require PathUtil::LayoutTemplate($this->layout);
        $result = ob_get_clean();
        $replacer = new Replacer();
        return $replacer->RealizeVariables($result);
    }
1321105
public function handleException($e)
    {
        if (!$e instanceof Exception) {
            $e = new FatalThrowableError($e);
        }

        $this->getExceptionRenderer()->render($e, $this->debug());
    }