This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients rhettinger
Date 2017-04-18.22:11:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492553512.25.0.992335940269.issue30097@psf.upfronthosting.co.za>
In-reply-to
Content
Filing this feature request on behalf of an engineering team that I work with.

This team creates Python tools for use by other departments.  Accordingly, their best practice is to use "raise CleanException from None" to give the cleanest error messages to their users while hiding the noise of implementation details and internal logic.  The exposed exceptions are a documented, guaranteed part of the API that users can reliably catch and handle.  This has worked well for them; however, when they are debugging the library itself it would be nice to have a way to suppress all the "from None" code and see fuller stack traces that indicate root causes.

One way to do this would be to have a command-line switch such as "python -C testcode.py".   Where the "-C" option means "Always show the cause of exceptions even when 'from None' is present.
History
Date User Action Args
2017-04-18 22:11:52rhettingersetrecipients: + rhettinger
2017-04-18 22:11:52rhettingersetmessageid: <1492553512.25.0.992335940269.issue30097@psf.upfronthosting.co.za>
2017-04-18 22:11:52rhettingerlinkissue30097 messages
2017-04-18 22:11:52rhettingercreate