clean up error serialization code a bit

pull/1/head
ansuz 4 years ago
parent 7ddeacc629
commit 8cabe7ded8

@ -160,14 +160,12 @@ define([
try { try {
iframe.postMessage(data, '*'); iframe.postMessage(data, '*');
} catch (err) { } catch (err) {
console.error(err); console.error(err, data);
console.error(data);
if (data && data.error && data.error instanceof Error) { if (data && data.error && data.error instanceof Error) {
data.error = Util.serializeError(data.error); data.error = Util.serializeError(data.error);
try { try {
iframe.postMessage(data, '*'); iframe.postMessage(data, '*');
} catch (err2) { } catch (err2) {
// XXX
console.error("impossible serialization"); console.error("impossible serialization");
throw err2; throw err2;
} }

Loading…
Cancel
Save