summaryrefslogtreecommitdiff
path: root/overrides
diff options
context:
space:
mode:
authorNickHolt <NickHolt93@gmail.com>2014-06-19 15:00:33 -0700
committerNickHolt <NickHolt93@gmail.com>2014-06-19 15:00:33 -0700
commitb35e15f1fac5159e7ed24f994520b9cdd7bbe948 (patch)
tree66fa24a29ff53cdf543922cec0675add95d0d19e /overrides
parentf29fb2663e115f5e6a7c71f92fbbb1fcf2a1b212 (diff)
doConnectionTestAsync will now re-throw errors.
When an error callback isn't provided, doConnectionTestAsync will now re-throw the error, instead of catching it. [endlessm/eos-sdk#1394]
Diffstat (limited to 'overrides')
-rw-r--r--overrides/endless_private/connection_test.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/overrides/endless_private/connection_test.js b/overrides/endless_private/connection_test.js
index 24a2a3c..ce2e0f9 100644
--- a/overrides/endless_private/connection_test.js
+++ b/overrides/endless_private/connection_test.js
@@ -7,6 +7,8 @@ const Gio = imports.gi.Gio;
// and are called in their relevent outcome cases. If the ping test completed,
// the userData will be passed to the callbacks. Additionally, the errorCallback
// will recieve the error as the first argument.
+// If an errorCallback is not provided, errors will be re-thrown (with the
+// exception of a Gio.ResolverError, which is a connection failure).
function doConnectionTestAsync(hostname, scheme, port, connectionSuccessCallback,
connectionFailureCallback,
errorCallback) {
@@ -33,6 +35,8 @@ function doConnectionTestAsync(hostname, scheme, port, connectionSuccessCallback
connectionFailureCallback(userData);
} else if (errorCallback) {
errorCallback(err, userData);
+ } else {
+ throw err;
}
}
});