You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tom Mornini <tm...@infomania.com> on 2000/04/10 21:17:27 UTC

A patch for Registry.pm (Against v1.22) (fwd)

Sorry for the repost. I typo'd in the Subject line(!) and I thought that
the message might get skipped over.

--- Original message

Reading through the Handling Errors section of the Eagle book, I was
unable to use $ENV{REDIRECT_ERROR_NOTES} to report on errors generated by
registry scripts. This patch corrects the problem in a clean, standard
Apache way. I don't think this will step on any toes, since in the case of
a Registry error, $r->notes('error-notes') was empty anyway...

I'm somewhat surprised that $r->log_error() doesn't set
r->notes('error-notes') itself! Should it?

I hope this helps others out. I really like the idea of giving something
back (even something so small!) to this community from which I've received
such utility and help.

*** Registry.pm Tue Mar 14 23:55:28 2000
--- RegistryTom.pm      Sun Apr  9 09:54:14 2000
***************
*** 152,157 ****
--- 152,158 ----
        }
  
        if($errsv) {
+             $r->notes('error-notes' => $errsv);
            $r->log_error($errsv);
            return SERVER_ERROR unless $Debug && $Debug & 2;
            return Apache::Debug::dump($r, SERVER_ERROR);

-- 
-- Tom Mornini
-- InfoMania Printing and Prepress