Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added section about built-in pages to tutorial
  • Loading branch information
kraih committed Jan 31, 2014
1 parent c827d62 commit 3b765df
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/Mojolicious/Lite.pm
Expand Up @@ -233,6 +233,22 @@ full access to all HTTP features and information.
app->start;
=head2 Built-in C<exception> and C<not_found> pages
During development you will encounter these pages whenever you make a mistake,
they are gorgeous and contain a lot of valuable information that will aid you
in debugging your application.
use Mojolicious::Lite;
# Not found (404)
get '/missing' => sub { shift->render('does_not_exist') };
# Exception (500)
get '/dies' => sub { die 'Intentional error' };
app->start;
=head2 Route names
All routes can have a name associated with them, this allows automatic
Expand Down

0 comments on commit 3b765df

Please sign in to comment.