Skip to content
Myr

Resolved conflict

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parents 2a79192, 32ed6c9 · Browse files · 2 files+14 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+14 added−0 removed

  • other:+14 added−0 removed

2 files+14 added−0 removed

modified:jinja2/debug.py+8 added
63 unmodified lines
64 lines = traceback.format_exception(self.exc_type, self.exc_value,65 self.frames[0], limit=limit)66 return ''.join(lines).rstrip()6768 def render_as_html(self, full=False):69 """Return a unicode string with the traceback as rendered HTML."""70 from jinja2.debugrenderer import render_traceback71 return u'%s\n\n<!--\n%s\n-->' % (72 render_traceback(self, full=full),73 self.render_as_text().decode('utf-8', 'replace')74 )7576 @property77 def is_template_syntax_error(self):78 """`True` if this is a template syntax error."""79 return isinstance(self.exc_value, TemplateSyntaxError)
217 unmodified lines
modified:jinja2/environment.py+6 added
198 unmodified lines
199 #: shared environments have this set to `True`. A shared environment200 #: must not be modified201 shared = False202203 #: these are currently EXPERIMENTAL undocumented features.204 exception_handler = None205 exception_formatter = None206207 def __init__(self,
274 unmodified lines
482 """483 global _make_traceback484 if exc_info is None:485 exc_info = sys.exc_info()486487 # the debugging module is imported when it's used for the first time.488 # we're doing a lot of stuff there and for applications that do not489 # get any exceptions in template rendering there is no need to load490 # all of that.491 if _make_traceback is None:492 from jinja2.debug import make_traceback as _make_traceback493 traceback = _make_traceback(exc_info, source_hint)494 if rendered and self.exception_formatter is not None:
376 unmodified lines