Commit 97b06d20 authored by Romain Courteaud's avatar Romain Courteaud

Make timeout error more developper friendly

parent 9aa8ac8f
......@@ -655,7 +655,13 @@
iframe_loading_deferred.promise,
// Timeout to prevent non renderJS embeddable gadget
// XXX Maybe using iframe.onload/onerror would be safer?
RSVP.timeout(5000)
new RSVP.Queue()
.push(function () {
return RSVP.timeout(5000);
})
.push(undefined, function () {
throw new Error('Timeout while loading: ' + url);
})
]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment