Better debug output when JSON encoding fails
This commit is contained in:
parent
5043fb5fb8
commit
34eeb93470
7
dist/libsignal-protocol.js
vendored
7
dist/libsignal-protocol.js
vendored
@ -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) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user