You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by ra...@apache.org on 2005/05/07 08:50:16 UTC

svn commit: r169054 - /perl/modperl/docs/trunk/src/docs/2.0/api/APR/Status.pod

Author: randyk
Date: Fri May  6 23:50:16 2005
New Revision: 169054

URL: http://svn.apache.org/viewcvs?rev=169054&view=rev
Log:
fix examples to handle case where APR::Status::is_E* is not true.

Modified:
    perl/modperl/docs/trunk/src/docs/2.0/api/APR/Status.pod

Modified: perl/modperl/docs/trunk/src/docs/2.0/api/APR/Status.pod
URL: http://svn.apache.org/viewcvs/perl/modperl/docs/trunk/src/docs/2.0/api/APR/Status.pod?rev=169054&r1=169053&r2=169054&view=diff
==============================================================================
--- perl/modperl/docs/trunk/src/docs/2.0/api/APR/Status.pod (original)
+++ perl/modperl/docs/trunk/src/docs/2.0/api/APR/Status.pod Fri May  6 23:50:16 2005
@@ -124,13 +124,10 @@
 
   eval { $obj->slurp_filename(0) };
   if ($@) {
-      if (ref $@ eq 'APR::Error') {
-          return Apache2::Const::FORBIDDEN if APR::Status::is_EACCES($@);
-      }
-      else {
-          return Apache2::Const::SERVER_ERROR;
-      }
-  }
+      return Apache2::Const::FORBIDDEN
+          if ref $@ eq 'APR::Error' && APR::Status::is_EACCES($@);
+      die $@;
+   }
 
 As discussed above with C<APR::Const::EAGAIN>, the advantage of
 using C<is_EACCES> is portability - just checking
@@ -164,12 +161,9 @@
 
   eval { $obj->slurp_filename(0) };
   if ($@) {
-      if (ref $@ eq 'APR::Error') {
-          return Apache2::Const::NOT_FOUND if APR::Status::is_ENOENT($@);
-      }
-      else {
-          return Apache2::Const::SERVER_ERROR;
-      }
+      return Apache2::Const::NOT_FOUND
+          if ref $@ eq 'APR::Error' && APR::Status::is_ENOENT($@);
+      die $@;
   }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org