A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-May/053674.html below:

[Python-Dev] Chained Exceptions

[Python-Dev] Chained Exceptions [Python-Dev] Chained ExceptionsGuido van Rossum gvanrossum at gmail.com
Fri May 13 01:12:35 CEST 2005
[Ka-Ping Yee]
> Suppose exceptions have an optional "context" attribute, which is
> set when the exception is raised in the context of handling another
> exception.  Thus:
> 
>     def a():
>         try:
>             raise AError
>         except:
>             raise BError
> 
> yields an exception which is an instance of BError.  This instance
> would have as its "context" attribute an instance of AError.
[...]

I like the idea, but I'm not sure about the consequences, and I'm not
sure how it can be defined rigorously. Would it only happen when
something *in* an except clause raises an exception? Which piece of
code would be responsible for doing this?

Try to come up with a precise specification and we'll talk.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4