New submission from Benjamin VENELLE <gu0su...@gmail.com>: Hi,
>From few days, I've acknowledge when throwing an exception, the last traceback >entry is always related to the raise statement. This is ok when the exception >takes source from a non fail-safe code. But when an exception is raised due to >a function's inputs sanity check (like an assertion error) the last traceback >entry is non-sense. I've done a script to spot this behavior. Is there a way to prevent last traceback rendering (not suppressing) while exception is displayed without explicit call to traceback.print_exception ? If not, it would be useful to have a boolean declared in Exception's classes which will allow last traceback entry rendering or not. ---------- components: Interpreter Core files: traceback_rendering.py messages: 126871 nosy: Kain94 priority: normal severity: normal status: open title: traceback's rendering behavior while throwing custom exception type: feature request versions: Python 3.1 Added file: http://bugs.python.org/file20488/traceback_rendering.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10986> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com