perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe M. Chiasson" <go...@ectoplasm.org>
Subject Re: Filter and Handlers should not reset $@ if it was set before entering
Date Tue, 10 Aug 2004 00:05:18 GMT
Here comes a revised patch that's cleaner by using macros.

Stas Bekman wrote:
> 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...
> 
> 

-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

Mime
View raw message