[IMP] qweb: add the current error traceback into the qweb traceback, if they are an error of expression evaluation
bzr revid: chm@openerp.com-20130813084543-0d7qvwdrija43g71
This commit is contained in:
@@ -7,6 +7,7 @@ import types
|
||||
|
||||
import xml # FIXME use lxml
|
||||
import xml.dom.minidom
|
||||
import traceback
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -110,7 +111,7 @@ class QWebXml(object):
|
||||
try:
|
||||
return eval(expr, None, v)
|
||||
except Exception:
|
||||
raise SyntaxError("QWeb: invalid expression %r while rendering template '%s'" % (expr, v.get('__template__')))
|
||||
raise SyntaxError("QWeb: invalid expression %r while rendering template '%s'.\n\n%s" % (expr, v.get('__template__'), traceback.format_exc()))
|
||||
|
||||
def eval_object(self, expr, v):
|
||||
return self.eval(expr, v)
|
||||
|
||||
Reference in New Issue
Block a user