Perrin Harkins wrote:

> local $SIG{'__DIE__'}  = sub { $error .= $_[0]; };
> 
> That's going to kill your exception handling code.  You need to change
> that if you want to be able to use eval() in your code.  Matt has an
> explanation of this in the exceptions part of the mod_perl Guide.


Hmm,

I think just commenting it worked !!. I have tried the following which 
have worked the way it should.

-------------------
# Exception handling
eval {die "blah blah blah";};
print "got : $@";
-------------------
die "blah blah blah";
-------------------
# Write to error log
use Apache::Log;
Apache->request->log->error("got : $@");
-------------------
# Syntax error
eval {die "blah blah blah";
print "got : $@";
-------------------


print STDERR "blah blah blah" is going to the browser but I am not 
really worried about it too much unless it is something I should worry 
about - anyone care to comment on that ?

Ofcourse I still dont understand why die was being trapped out there.

Thanks to Perrin and Matt for their suggestions anyway.



Mithun

Reply via email to