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/036241.html below:

[Python-Dev] Exception masking/chaining

[Python-Dev] Exception masking/chaining [Python-Dev] Exception masking/chainingGuido van Rossum guido@python.org
Thu, 12 Jun 2003 11:22:39 -0400
> > [...]
> >>I don't understand that. What is a "spurious" traceback? And how
> >>are you going to get one if the current traceback is empty?
> > 
> > I was imagining that the default mechanism for printing tracebacks
> > would always try to follow the chain of tracebacks, and report not
> > just the traceback, but also the exception that was replaced.  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.
> 
> Isn't the new sys.exc_clear() usable for that? (I.e. raising
> a fresh exception without any chained ones?)

But that's backwards incompatible, in the sense that currently you
don't need to call exc_clear() unless under very special
circumstances.

--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