summaryrefslogtreecommitdiff
path: root/js/test/Ice/retry/Client.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/test/Ice/retry/Client.js')
-rw-r--r--js/test/Ice/retry/Client.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/js/test/Ice/retry/Client.js b/js/test/Ice/retry/Client.js
index 06f15ccc550..6a399016e20 100644
--- a/js/test/Ice/retry/Client.js
+++ b/js/test/Ice/retry/Client.js
@@ -14,11 +14,16 @@
async function allTests(out, communicator, communicator2)
{
- function test(value)
+ function test(value, ex)
{
if(!value)
{
- throw new Error("test failed");
+ let message = "test failed";
+ if(ex)
+ {
+ message += "\n" + ex.toString();
+ }
+ throw new Error(message);
}
}
@@ -53,11 +58,11 @@
{
if(typeof(window) === 'undefined' && typeof(WorkerGlobalScope) === 'undefined') // Nodejs
{
- test(ex instanceof Ice.ConnectionLostException);
+ test(ex instanceof Ice.ConnectionLostException, ex);
}
else // Browser
{
- test(ex instanceof Ice.SocketException);
+ test(ex instanceof Ice.SocketException, ex);
}
out.writeLine("ok");
}
@@ -79,7 +84,7 @@
}
catch(ex)
{
- test(ex instanceof Ice.LocalException);
+ test(ex instanceof Ice.LocalException, ex);
}
out.writeLine("ok");
@@ -92,7 +97,7 @@
}
catch(ex)
{
- test(ex instanceof Ice.InvocationTimeoutException);
+ test(ex instanceof Ice.InvocationTimeoutException, ex);
}
await retry2.opIdempotent(-1);