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 elazar
Recipients elazar
Date 2013-10-12.16:41:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za>
In-reply-to
Content
There's no dedicated StackOverflowErrorException, So there is no way to accurately distinguish a recursion overflow from a general RuntimeError. 

One cannot use the exception message, since the docs explicitly says that "Exception messages are not part of the Python API", and checking for

    len(traceback.extract_tb(trace)) >= sys.getrecursionlimit()-1

is ugly, and (AFAIK) not guaranteed to be correct.

Use case: I've found this while trying to create a cycle detector that will compress the traceback of such errors.

See discussion in python-ideas:
https://mail.python.org/pipermail/python-ideas/2013-September/023190.html

An cycle-detection implementation:
http://code.activestate.com/recipes/578660-concise-output-for-maximum-recursion-depth-exceede/
History
Date User Action Args
2013-10-12 16:41:47elazarsetrecipients: + elazar
2013-10-12 16:41:47elazarsetmessageid: <1381596107.9.0.320701037292.issue19235@psf.upfronthosting.co.za>
2013-10-12 16:41:47elazarlinkissue19235 messages
2013-10-12 16:41:47elazarcreate