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.

Not really, for the reason I pointed out earlier. If we localize $@, then a new error will not be noticed and be replaced by the previous one (potentially none) loosing important failure information.

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.

Yeah, makes sense.

MP_SAVE_ERRSV(tmpsv)
MP_RESTORE_ERRSV(tmpsv)

Good enough ?


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...

I know the feeling ;-)


-- -------------------------------------------------------------------------------- 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

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to