review: add comment about snippet_code

This commit is contained in:
Stanislav Seletskiy 2015-10-21 13:40:49 +06:00
parent 47a3d18629
commit d03b13a684

View File

@ -68,6 +68,9 @@ Following is the full stack trace:
""" """
msg += traceback.format_exc() msg += traceback.format_exc()
# snippet_code comes from _python_code.py, it's set manually for
# providing error message with stacktrace of failed python code
# inside of the snippet.
if hasattr(e, 'snippet_code'): if hasattr(e, 'snippet_code'):
_, _, tb = sys.exc_info() _, _, tb = sys.exc_info()
tb_top = traceback.extract_tb(tb)[-1] tb_top = traceback.extract_tb(tb)[-1]