[IMP] QWeb2: do not swallow stack trace with try,catch in debug mode

bzr revid: fme@openerp.com-20111020104218-q0qe91v99hz8a4yq
This commit is contained in:
Fabien Meghazi
2011-10-20 12:42:18 +02:00
parent ca453718e8
commit b4cb0ae477
+6 -4
View File
@@ -318,12 +318,14 @@ QWeb2.Engine = (function() {
" dict = dict || {};\n" +
" dict['__template__'] = '" + template + "';\n" +
" var r = [];\n" +
" /* START TEMPLATE */ try {\n" +
" /* START TEMPLATE */" +
(this.debug ? "" : " try {\n") +
(e.compile()) + "\n" +
" /* END OF TEMPLATE */ } catch(error) {\n" +
" /* END OF TEMPLATE */" +
(this.debug ? "" : " } catch(error) {\n" +
" if (console && console.exception) console.exception(error);\n" +
" context.engine.tools.exception('Runtime Error: ' + error, context);\n" +
" }\n" +
" context.engine.tools.exception('Runtime Error: ' + error, context);\n") +
(this.debug ? "" : " }\n") +
" return r.join('');";
},
render : function(template, dict) {