Catch asynchronous errors
This commit is contained in:
parent
c86b213861
commit
4d634c78be
|
@ -18,7 +18,13 @@ Ground.prototype = new Dataspace(null);
|
|||
|
||||
Ground._resolved = Promise.resolve();
|
||||
Ground.laterCall = function (thunk) {
|
||||
Ground._resolved.then(thunk);
|
||||
Ground._resolved.then(() => {
|
||||
try {
|
||||
thunk();
|
||||
} catch (e) {
|
||||
console.error("SYNDICATE/JS INTERNAL ERROR", e);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Ground.prototype.backgroundTask = function (k) {
|
||||
|
|
Loading…
Reference in New Issue