perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: Filter and Handlers should not reset $@ if it was set before entering
Date Mon, 09 Aug 2004 23:32:11 GMT
Philippe M. Chiasson wrote:
> 
> 
> Stas Bekman wrote:
> 
>>>> Yes, this $@ save/restore logic could be added to filters only. But, 
>>>> still,
>>>> in the case of a failing response handler & filter handler, you'd 
>>>> lose the
>>>> error from the filter.
>>>
>>>
>>>
>>> At least, here is a patch that does the same thing, but only for 
>>> filters.
>>
>>
>>
>> The problem with filters is that Apache has no provision for error 
>> handling. So may be we should at least Perl_warn it, before restoring 
>> ERRSV?
> 
> 
> Attached patch moves $@ save/restoring to filter logic only, and does warn
> in the case of a filter error detected while there was already another 
> known
> error before entering the filter

I guess it works for now. I thought that we could still possibly 
localize $@ at some point.

In any case it looks good, but I'd like to see the added craft wrapped 
into 2 macros, since it makes the code less readable in the expanded 
form. Thanks. Feel free to call those macros in either way you prefer.

>>>> Maybe we need to be smarter about this a bit and somehow concatenate 
>>>> the
>>>> errors ?
>>
>>
>>
>> Sounds like a good idea. But may be later.
> 
> 
> Something like APR::Error supporting aggregated errors maybe ?

May be, I haven't given it any thought. Trying to juggle too many issue 
at once...


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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


Mime
View raw message