[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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user