You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2002/05/23 06:21:07 UTC
cvs commit: modperl/t/net/perl server_error.pl
dougm 02/05/22 21:21:07
Modified: . Changes STATUS
lib/Apache Registry.pm
t/net/perl server_error.pl
Log:
Submitted by: Jesse Erlbaum <je...@vm.com>
Reviewed by: dougm
Apache::Registry errors are now saved in $r->notes('error-notes')
Revision Changes Path
1.645 +3 -0 modperl/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl/Changes,v
retrieving revision 1.644
retrieving revision 1.645
diff -u -r1.644 -r1.645
--- Changes 23 May 2002 03:38:39 -0000 1.644
+++ Changes 23 May 2002 04:21:06 -0000 1.645
@@ -10,6 +10,9 @@
=item 1.26_01-dev
+Apache::Registry errors are now saved in $r->notes('error-notes')
+[Jesse Erlbaum <je...@vm.com>]
+
fix Win32 build problems with spaces in shell arguments
[Randy Kobes <ra...@theoryx5.uwinnipeg.ca>]
1.20 +1 -10 modperl/STATUS
Index: STATUS
===================================================================
RCS file: /home/cvs/modperl/STATUS,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- STATUS 23 May 2002 03:38:39 -0000 1.19
+++ STATUS 23 May 2002 04:21:06 -0000 1.20
@@ -1,5 +1,5 @@
mod_perl 1.3 STATUS:
- Last modified at [$Date: 2002/05/23 03:38:39 $]
+ Last modified at [$Date: 2002/05/23 04:21:06 $]
Release:
@@ -9,15 +9,6 @@
Available Patches:
-
- * implement notes('error-notes') in Registry a la mod_cgo
- Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=101862462900504&w=2
- Status:
- I haven't had the chance to investigate this thoroughly, but
- mod_perl does seem to be setting error-notes for some things. maybe
- just not enough things or Registry specific things? --Geoff
- patch available at
- http://marc.theaimsgroup.com/?l=apache-modperl&m=101862462900504&w=2
* Apache::Status allows standard keys to be overridden
Report: http://marc.theaimsgroup.com/?l=apache-modperl&m=101559176217056&w=2
1.34 +10 -4 modperl/lib/Apache/Registry.pm
Index: Registry.pm
===================================================================
RCS file: /home/cvs/modperl/lib/Apache/Registry.pm,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- Registry.pm 28 Sep 2000 16:35:53 -0000 1.33
+++ Registry.pm 23 May 2002 04:21:07 -0000 1.34
@@ -24,6 +24,13 @@
$Apache::Registry::MarkLine = 1;
}
+sub xlog_error {
+ my($r, $msg) = @_;
+ $r->log_error($msg);
+ $r->notes('error-notes', $msg);
+ $@{$r->uri} = $msg;
+}
+
sub handler {
my $r = shift;
if(ref $r) {
@@ -127,8 +134,7 @@
compile($eval);
$r->stash_rgy_endav($script_name);
if ($@) {
- $r->log_error($@);
- $@{$uri} = $@;
+ xlog_error($r, $@);
return SERVER_ERROR unless $Debug && $Debug & 2;
return Apache::Debug::dump($r, SERVER_ERROR);
}
@@ -152,7 +158,7 @@
}
if($errsv) {
- $r->log_error($errsv);
+ xlog_error($r, $errsv);
return SERVER_ERROR unless $Debug && $Debug & 2;
return Apache::Debug::dump($r, SERVER_ERROR);
}
@@ -165,7 +171,7 @@
# }
return $r->status($old_status);
} else {
- $r->log_error("$filename not found or unable to stat");
+ xlog_error($r, "$filename not found or unable to stat");
return NOT_FOUND unless $Debug && $Debug & 2;
return Apache::Debug::dump($r, NOT_FOUND);
}
1.2 +11 -2 modperl/t/net/perl/server_error.pl
Index: server_error.pl
===================================================================
RCS file: /home/cvs/modperl/t/net/perl/server_error.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- server_error.pl 19 Mar 1998 23:09:06 -0000 1.1
+++ server_error.pl 23 May 2002 04:21:07 -0000 1.2
@@ -2,9 +2,18 @@
$r->send_http_header("text/plain");
-print "ServerError:\n";
+my $err = $@{$r->prev->uri};
-print $@{$r->prev->uri};
+my $note = $r->prev->notes('error-notes') || 'NONE';
+
+print "ServerError: $err\n";
+
+if ($note eq $err) {
+ print "error-notes is also set";
+}
+else {
+ print "error-notes is different: $note";
+}
print "\n";
print 'dump of %@:', "\n";