Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Throwing an error
  • I can't seem to find any notes about this in the documentation and my best efforts to read the API failed. How would one throw an error? A 500 or a 404, or otherwise.
  • That's not an error (in the strict sense of the word), but an HTTP status code. You show the standard 404 page (defined in your routes.php config file) via
    \Request::show_404();
    

    If you want to set a status code on your current page, use the controllers response object:
    $this->response->status = '501';
    
  • Ah that's what I was trying to get at, showing the error page. That's perfect, thanks.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion