Re: rethrow_exception: $@ garbled

Dmitry Karasik <[email protected]> Tue, 30 Jan 2007 21:56:09 +0100
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
ok, patch and new test are attached. hope these are ok!

/dk

btw, mailing list at sourceforge is sort of broken, doesn't
allow me to send from my domain:

<[email protected]>: host
    externalmx-1.sourceforge.net[12.152.184.25] said: 451-Could not complete
    sender verify callout 451-Could not complete sender verify callout for
    <[email protected]>. 451-The mail server(s) for the domain may be
    temporarily unreachable, or 451-they may be permanently unreachable from
    this server. In the latter case, 451-you need to change the address or
    create an MX record for its domain 451-if it is supposed to be generally
    accessible from the Internet. 451 Talk to your mail administrator for
    details. (in reply to RCPT TO command)

I think they don't like hosts with graylisting enabled, someone should talk
to sourceforge mail staff possibly.





On Tue, Jan 30, 2007 at 01:51:59PM -0600, Dave Rolsky wrote:
> On Tue, 30 Jan 2007, Dmitry Karasik wrote:
> 
> >I'm curious if anyone noticed the fact that rethrow_exception that is 
> >called from Mason $SIG{__DIE__} doesn't care about $^S, which results in 
> >nasty garbled $@ when die is (legitimately) issued inside eval? I'd send 
> >a patch, which is trivial (return if $^S) but I'd like to know if there 
> >are reasons why it is not done already.
> 
> I don't think there's any reason it's not a done. A patch with a test 
> would be ideal.
> 
> 
> -dave
> 
> /*===================================================
> VegGuide.Org                        www.BookIRead.com
> Your guide to all that's veg.       My book blog
> ===================================================*/

-- 
Sincerely,

	Dmitry Karasik

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Mason-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-devel
05b-exception-corruption.t (application/x-troff, 829 B) - not displayed
diff (text/plain, 878 B)
--- /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Request.pm	Wed Jan 24 09:16:34 2007
+++ /usr/ports/www/p5-HTML-Mason/work/HTML-Mason-1.35/lib/HTML/Mason/Request.pm	Tue Jan 30 21:38:45 2007
@@ -216,10 +216,12 @@
 # Attempt to load each plugin module once per process
 my %plugin_loaded;
 
+sub die_handler { rethrow_exception unless $^S }
+
 sub _initialize {
     my ($self) = @_;
 
-    local $SIG{'__DIE__'} = \&rethrow_exception;
+    local $SIG{'__DIE__'} = \&die_handler;
 
     eval {
         # Check the static_source touch file, if it exists, before the
@@ -375,7 +377,7 @@
     return unless $self->initialized();
 
     # All errors returned from this routine will be in exception form.
-    local $SIG{'__DIE__'} = \&rethrow_exception;
+    local $SIG{'__DIE__'} = \&die_handler;
 
     # Cheap way to prevent users from executing the same request twice.
     #