diff options
author | Rory MacQueen <rorymacqueen@gmail.com> | 2014-06-19 17:45:31 -0700 |
---|---|---|
committer | Rory MacQueen <rorymacqueen@gmail.com> | 2014-06-19 17:45:31 -0700 |
commit | 6cd87dc22ef9b72f5b5ba7708d20f9afc8bce2fa (patch) | |
tree | f58f43f8932f2ae5b60d51ef1af5417dac68482e /overrides | |
parent | c76b94e50ce1ebc7f7729dda9c86dc1e943a16cf (diff) | |
parent | b35e15f1fac5159e7ed24f994520b9cdd7bbe948 (diff) |
Merge pull request #1395 from endlessm/sdk/1394
doConnectionTestAsync will now re-throw errors.
Diffstat (limited to 'overrides')
-rw-r--r-- | overrides/endless_private/connection_test.js | 4 |
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; } } }); |