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/2003-June/036292.html below:

[Python-Dev] Exception masking/chaining

[Python-Dev] Exception masking/chainingGuido van Rossum guido@python.org
Thu, 12 Jun 2003 20:52:38 -0400
> > There's a lot of C code out there that catches e.g. AttributeError and
> > replaces it with a more specific error (e.g. BifurcationError("can't
> > bifurcate the sploorg") replacing AttributeError("__bifurcate__").  I
> > think this would cause end user confusion.
> 
> But that is a different case. As I understand it, chaining would only
> occur if a second exception was raised *before* the current exception
> was caught -- e.g. if there's a bug in a piece of code in a finally
> block that's being executed while unwinding to find an exception
> handler.

Interesting..  I had never even thought of this case.  I thought
chaining was specifically when catching an exception and raising
another in its place.

To the people who came up with the idea, which is it?

(I can see an argument for both cases; maybe they should be supported
using different system attributes on the exception object?)

--Guido van Rossum (home page: http://www.python.org/~guido/)



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