[Python-Dev] "with" use case: exception chaining
Guido van Rossum
gvanrossum at gmail.com
Thu May 12 23:16:17 CEST 2005
[Ka-Ping Yee]
> Example 1: Exception Chaining.
>
> As has been previously discussed, the information from an exception can
> be lost when the handling of the exception runs into a problem. It is
> often helpful to preserve the original reason for the problem.
[example deleted]
This problem is universal -- every except clause (in theory) can have
this problem. I'd much rather deal with this in a systematic way in
the Python VM's exception handling machinery. Modifying every
potentially affected except clause to use some additional boilerplate
doesn't strike me as a good solution.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list