perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kee Hinckley <naz...@somewhere.com>
Subject Re: Trapping errors from embperl subroutines
Date Sun, 17 Aug 2003 13:14:51 GMT
At 12:51 PM +0200 8/17/03, Gerald Richter wrote:
>I am not quite sure what the try .. otherwise does internaly, but could you
>try what happens with you write
>
>eval { $this-> process ... } ;
>if ($@) { ... throw }
>
>does this catch you exception?

try is basically an eval.  The problem is that there isn't an 
exception.  Embperl catches the exception in it's eval, logs it to 
apache, and then returns with Error() set to some value.  As a result 
I've lost the object that I associated with the error I threw.  Also, 
although I can recover the error text using Embperl's internal array 
of error messages that have been generated, there doesn't appear to 
be any way to clear that array.
-- 
Kee Hinckley
http://www.messagefire.com/          Anti-Spam Service for your POP Account
http://commons.somewhere.com/buzz/   Writings on Technology and Society

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message