Skip to content

Instantly share code, notes, and snippets.

@theredpea
Created February 7, 2018 20:10
Show Gist options
  • Select an option

  • Save theredpea/d638521ea3d6c744f74298058c0d3496 to your computer and use it in GitHub Desktop.

Select an option

Save theredpea/d638521ea3d6c744f74298058c0d3496 to your computer and use it in GitHub Desktop.
//November 2017 code
//-----------
//the request-aborted is logged in this `core.models/app.open` function
//which binds to `e.session.Error`, waits 1 second, then console logs. Notice it only logs if:
//e.error is something
//and e.error is not handled : `!e.error.isHandled`
}),
define("core.models/app", ["core.models/rpc-base", "core.models/rpc-session", "core.models/engine", "core.utils/deferred", "util"], function(e, t, n, i, r) {
"use strict";
var o, s, a, l = {};
return o = e.extend("App", {
init: function(e, n, r, o, a) {
...
},
open: function() {
var e = this;
return e.session.Error.bind(function(e) {
setTimeout(function() {
e.error && !e.error.isHandled && window.console.log("Error from Engine:", e)
}, 1e3)
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment