X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=1a7e76c01d863cde64cdf7e6777cee9e59ffe8e8;hp=702f056e04a156c2f8f983733758661755f71e41;hb=ca81eb671ce5f08854acab82cf46c17a64801ce6;hpb=9ecc267238aa4b8b7e09ef834c08f5a7b5351771 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 702f056..1a7e76c 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -291,11 +291,6 @@ Add a new error. $c->error('Something bad happened'); -Clear errors. You probably don't want to clear the errors unless you are -implementing a custom error screen. - - $c->error(0); - =cut sub error { @@ -308,6 +303,22 @@ sub error { return $c->{error} || []; } +=head2 $c->clear_errors + +Clear errors. You probably don't want to clear the errors unless you are +implementing a custom error screen. + +This is equivalent to running + + $c->error(0); + +=cut + +sub clear_errors { + my $c = shift; + $c->error(0); +} + =head2 $c->response =head2 $c->res