mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #2324: Print a hint how to increase the recursion limit when it is hit.
This commit is contained in:
parent
532e99c96b
commit
4cc2d0114c
1
CHANGES
1
CHANGES
@ -19,6 +19,7 @@ Bugs fixed
|
||||
* #2287: ``sphinx.transforms.Locale`` always uses rst parser. Sphinx i18n feature should
|
||||
support parsers that specified source_parsers.
|
||||
* #2290: Fix ``sphinx.ext.mathbase`` use of amsfonts may break user choice of math fonts
|
||||
* #2324: Print a hint how to increase the recursion limit when it is hit.
|
||||
|
||||
|
||||
Release 1.3.5 (released Jan 24, 2016)
|
||||
|
@ -270,6 +270,14 @@ def main(argv):
|
||||
print(red('The full traceback has been saved in %s, if you want '
|
||||
'to report the issue to the developers.' % tbpath),
|
||||
file=error)
|
||||
elif isinstance(err, RuntimeError) and 'recursion depth' in str(err):
|
||||
print(red('Recursion error:'), file=error)
|
||||
print(terminal_safe(text_type(err)), file=error)
|
||||
print(file=error)
|
||||
print('This can happen with very large or deeply nested source '
|
||||
'files. You can carefully increase the default Python '
|
||||
'recursion limit of 1000 in conf.py with e.g.:', file=error)
|
||||
print(' import sys; sys.setrecursionlimit(1500)', file=error)
|
||||
else:
|
||||
print(red('Exception occurred:'), file=error)
|
||||
print(format_exception_cut_frames().rstrip(), file=error)
|
||||
|
Loading…
Reference in New Issue
Block a user