thanks, i've applied a variation of your patch to cvs and will be in 1.27
if anybody wants to work up a similar patch for Apache::PerlRun, that'd be 
nice too.

On Fri, 12 Apr 2002, Jesse Erlbaum wrote:

> Hello Doug & All --
> 
> One of my programmers (Dave Kaufman) brought to my attention a small but
> useful feature which is present in mod_cgi, but missing from
> Apache::Registry.  When running via mod_cgi, if execution of a CGI
> application fails, an error message will be propagated to an environment
> variable, "ERROR_NOTES".  This environment variable can be used by a custom
> "ErrorDocument" to assist in quality assurance.
> 
> This variable is actually propagated, by http_request.c (confirmed in Apache
> 1.3.20), from an Apache "note" whose key is "error-notes".  A number of
> Apache handlers use the "error-notes" attribute to pass along human-readable
> exception data.
> 
> Following is a patch I wrote (against mod_perl 1.26, Apache::Registry
> version 2.01) which causes Apache::Registry to participate in this scheme.
> I hope you find it sufficiently useful to include in the next version of
> mod_perl.
> 
> 
> Warmest regards,
> 
> -Jesse-
> 
> 
> ----START PATCH---->
> diff -c -r1.1 Registry.pm
> *** modules/i686-linux/Apache/Registry.pm       13 Mar 2002 18:06:34 -0000
> 1.1
> --- modules/i686-linux/Apache/Registry.pm       22 Mar 2002 22:19:10 -0000
> ***************
> *** 129,134 ****
> --- 129,135 ----
>             if ($@) {
>                 $r->log_error($@);
>                 $@{$uri} = $@;
> +               $r->notes('error-notes', $@);
>                 return SERVER_ERROR unless $Debug && $Debug & 2;
>                 return Apache::Debug::dump($r, SERVER_ERROR);
>             }
> ***************
> *** 153,158 ****
> --- 154,160 ----
>   
>         if($errsv) {
>             $r->log_error($errsv);
> +           $r->notes('error-notes', $errsv);
>             return SERVER_ERROR unless $Debug && $Debug & 2;
>             return Apache::Debug::dump($r, SERVER_ERROR);
>         }
> <----END PATCH----
> 
> 
> 
>   Jesse Erlbaum, CTO
>   Vanguard Media
>   http://www.vm.com
>   212.242.5317 x115
>   [EMAIL PROTECTED]
> 
> 
> 
> 

Reply via email to