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/2010-August/102776.html below:

[Python-Dev] breaking an exception chain

[Python-Dev] breaking an exception chainBenjamin Peterson benjamin at python.org
Tue Aug 3 19:22:30 CEST 2010
2010/8/3 R. David Murray <rdmurray at bitdance.com>:
> Working with Catherine on an argparse bug, we ran into a test that was
> apparently failing by raising a SystemExit, when the test harness was
> supposed to be catching that error.  It took us a bit to realize that
> there wasn't really a SystemExit error, but that what we were seeing was
> the SystemExit chained to the exception the test harness was purposfully
> raising after catching the SystemExit.  In Python2, only the second,
> intentionally raised exception would be printed by unittest.  In Python3,
> the "main error" printed by unittest is the SystemExit, and the error
> raised by the test harness appears after the "while processing the above
> error" sentence.  Needless to say, this is a bit confusing.
>
> So I thought I'd break the exception chain before raising the error the
> test harness really wants to raise.  However, I can't figure out any way
> to do that.  Am I missing something, or this a missing feature?

Missing feature; there's a bug report somewhere.



-- 
Regards,
Benjamin
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