Better debug output when JSON encoding fails

This commit is contained in:
lilia 2016-09-27 14:16:58 -07:00
parent 5043fb5fb8
commit 34eeb93470
2 changed files with 12 additions and 2 deletions

View File

@ -35541,7 +35541,12 @@ Internal.SessionRecord = function() {
} else if (thing === Object(thing)) {
var obj = {};
for (var key in thing) {
obj[key] = ensureStringed(thing[key]);
try {
obj[key] = ensureStringed(thing[key]);
} catch (ex) {
console.log('Error serializing key', key);
throw ex;
}
}
return obj;
} else if (thing === null) {

View File

@ -42,7 +42,12 @@ Internal.SessionRecord = function() {
} else if (thing === Object(thing)) {
var obj = {};
for (var key in thing) {
obj[key] = ensureStringed(thing[key]);
try {
obj[key] = ensureStringed(thing[key]);
} catch (ex) {
console.log('Error serializing key', key);
throw ex;
}
}
return obj;
} else if (thing === null) {