Documented more changes
--HG--
branch : trunk
diff --git a/jinja2/environment.py b/jinja2/environment.py
index 803e7a8..f163ab5 100644
--- a/jinja2/environment.py
+++ b/jinja2/environment.py
@@ -194,6 +194,7 @@
#: must not be modified
shared = False
+ #: these are currently EXPERIMENTAL undocumented features.
exception_handler = None
exception_formatter = None
@@ -475,13 +476,21 @@
global _make_traceback
if exc_info is None:
exc_info = sys.exc_info()
+
+ # the debugging module is imported when it's used for the first time.
+ # we're doing a lot of stuff there and for applications that do not
+ # get any exceptions in template rendering there is no need to load
+ # all of that.
if _make_traceback is None:
from jinja2.debug import make_traceback as _make_traceback
+
traceback = _make_traceback(exc_info, source_hint)
+
if rendered and self.exception_formatter is not None:
return self.exception_formatter(traceback)
if self.exception_handler is not None:
self.exception_handler(traceback)
+
exc_type, exc_value, tb = traceback.standard_exc_info
raise exc_type, exc_value, tb