perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
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 
> 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     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message