# HG changeset patch # User Aurelien Campeas # Date 1316703226 -7200 # Node ID 6af00dbfaadd64da17ddbdd540a1f352a482d98a # Parent 37d23a1d3547bc003c8e1cf15537e55e9bba9e6c [cubicweb.js] log evalJSON errors (closes #1947473) diff -r 37d23a1d3547 -r 6af00dbfaadd web/data/cubicweb.js --- a/web/data/cubicweb.js Thu Sep 22 16:53:43 2011 +0200 +++ b/web/data/cubicweb.js Thu Sep 22 16:53:46 2011 +0200 @@ -53,7 +53,13 @@ }, evalJSON: function (json) { // trust source - return eval("(" + json + ")"); + try { + return eval("(" + json + ")"); + } catch(e) { + cw.log(e); + cw.log('The faulty json source was', json); + throw (e); + } }, urlEncode: function (str) {