Expanded c->error docs (drewbie)
Andy Grundman [Fri, 18 Nov 2005 04:35:40 +0000 (04:35 +0000)]
lib/Catalyst.pm
lib/Catalyst/Engine/HTTP.pm

index b7dd179..87fd4af 100644 (file)
@@ -289,7 +289,9 @@ sub detach { my $c = shift; $c->dispatcher->detach( $c, @_ ) }
 
 =item $c->error($arrayref)
 
-Returns an arrayref containing error messages.
+Returns an arrayref containing error messages.  If Catalyst encounters an
+error while processing a request, it stores the error in $c->error.  This
+method should not be used to store non-fatal error messages.
 
     my @error = @{ $c->error };
 
@@ -297,7 +299,8 @@ Add a new error.
 
     $c->error('Something bad happened');
 
-Clear errors.
+Clear errors.  You probably don't want to clear the errors unless you are
+implementing a custom error screen.
 
     $c->error(0);
 
index 1d715f5..f685a1e 100644 (file)
@@ -228,8 +228,8 @@ sub _handler {
 
         # Initialize CGI environment
         local %ENV = (
-            PATH_INFO    => $path         || '',
-            QUERY_STRING => $query_string || '',
+            PATH_INFO       => $path         || '',
+            QUERY_STRING    => $query_string || '',
             REMOTE_ADDR     => $sockdata->{peeraddr},
             REMOTE_HOST     => $sockdata->{peername},
             REQUEST_METHOD  => $method || '',