[Python-Dev] Fix import errors to have data
Guido van Rossum
guido at python.org
Tue Jul 27 19:07:10 CEST 2004
> Another possibility could be to add a ChainedImportError (or
> SubImportError?) which would derive from ImportError. The module
> which imports a broken module would get the normal ImportError. If
> the module doesn't catch the exception, it would get converted to this
> new type of ImportError.
>
> I don't know how easy this would be to implement, but I think it
> would solve Jim's problem and perhaps be easier to deal with?
Having had the recent opportunity to root around in Java code that
chains exceptions like this a lot, I think I'm against that approach.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list