Commit 8879c334 by Jonatan Heyman

Added error message that is displayed when stack can not be retrieved because of…

Added error message that is displayed when stack can not be retrieved because of IndexError in inspect.stack()
parent c272df40
......@@ -36,7 +36,13 @@ def _get_stacktrace():
except IndexError:
# this is a work around because python's inspect.stack() sometimes fail
# when jinja templates are on the stack
return []
return [(
"",
0,
"Error retrieving stack",
"Could not retrieve stack. IndexError exception occured in inspect.stack(). "
"This error might occur when jinja2 templates is on the stack.",
)]
return _tidy_stacktrace(reversed(stack))
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment