[prev in list] [next in list] [prev in thread] [next in thread]
List: mason-cvs
Subject: [Mason-checkins] CVS: mason/dist/lib/HTML/Mason Request.pm,1.339,1.340
From: Jonathan Swartz <jswartz () users ! sourceforge ! net>
Date: 2004-12-21 6:39:29
Message-ID: E1Cgdg9-0003Gc-7V () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/mason/mason/dist/lib/HTML/Mason
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12549/dist/lib/HTML/Mason
Modified Files:
Request.pm
Log Message:
If a request fails during initialization (e.g. the top-level component cannot be \
loaded), then return immediately if and when exec() is called. See \
http://masonhq.com/?WhyRequestPrepareErrors. This is probably not the final API, but \
it is good enough for 1.3 release and closest to the existing behavior.
Index: Request.pm
===================================================================
RCS file: /cvsroot/mason/mason/dist/lib/HTML/Mason/Request.pm,v
retrieving revision 1.339
retrieving revision 1.340
diff -u -r1.339 -r1.340
--- Request.pm 13 Dec 2004 20:22:28 -0000 1.339
+++ Request.pm 21 Dec 2004 06:39:26 -0000 1.340
@@ -156,6 +156,7 @@
( read_only => [ qw(
count
dhandler_arg
+ initialized
interp
parent_request
plugin_instances
@@ -179,6 +180,7 @@
%$self = (%$self,
dhandler_arg => undef,
execd => 0,
+ initialized => 0,
stack => [],
top_stack => undef,
wrapper_chain => undef,
@@ -313,6 +315,8 @@
my $err = $@;
if ($err and !$self->_aborted_or_declined($err)) {
$self->_handle_error($err);
+ } else {
+ $self->{initialized} = 1;
}
}
@@ -359,6 +363,10 @@
my ($self) = @_;
my $interp = $self->interp;
+ # If the request failed to initialize, the error has already been handled
+ # at the bottom of _initialize(); just return.
+ return unless $self->initialized();
+
# All errors returned from this routine will be in exception form.
local $SIG{'__DIE__'} = \&rethrow_exception;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Mason-checkins mailing list
Mason-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic