[lxml-dev] Restrict exception error log to local errors?
Stefan Behnel
stefan_ml at behnel.de
Thu Jan 24 13:09:59 CET 2008
Hi,
jholg at gmx.de wrote:
>> currently, the "error_log" property on exceptions raised by lxml
>> represents a
>> frozen snapshot of the global error log, thus aggregating loads of errors
>> that
>> have recently occurred, but that are not necessarily related to the
>> problem
>> that lead to the exception. However, we could often restrict that to an
>> error
>> log snapshot that is local to the operation that raised the exception.
>>
>> Question: should this be changed? Is there a reason this should not be
>> changed for 2.0?
>
> I for one am indifferent (since I never even noticed the aggregation
> behaviour so far ;-)
That's about what I was expecting. :)
> If someone wants to have kind of an exception history, then there'll still
> be the global
>
> error log (?).
... which is not currently accessible by itself.
>From my POV, you would normally use the "error_log" property of the thing you
are working with (XSLT, RelaxNG, XPath, ...) rather than the exception. The
only case where it is interesting to access the log through the exception
would be the instantiation of such an object. And here, I don't think you'd be
interested in anything but the cause of the problem.
So, guess I'll just change it in general and make it another beta. :)
Stefan
More information about the lxml-dev
mailing list