Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
authordiosmosis <benakamoorthi@fastmail.fm>2014-03-06 22:22:52 +0400
committerdiosmosis <benakamoorthi@fastmail.fm>2014-03-06 22:22:52 +0400
commita43cae6db06688d289eea9a8474dae563f66bc13 (patch)
treeab7d43f3ebfd60d1d86900599a7ef42955a73e18 /tests/lib
parent0a983024f0845a4f29e6c8bbc492858b7968b39e (diff)
Refs #4739, pass along errors to callback in testEnvironment Piwik API/Controller calls.
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/screenshot-testing/support/test-environment.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/lib/screenshot-testing/support/test-environment.js b/tests/lib/screenshot-testing/support/test-environment.js
index 0bdb52cc21..7130207c38 100644
--- a/tests/lib/screenshot-testing/support/test-environment.js
+++ b/tests/lib/screenshot-testing/support/test-environment.js
@@ -66,11 +66,13 @@ TestingEnvironment.prototype._call = function (params, done) {
try {
response = JSON.parse(response);
} catch (e) {
- throw new Error("Unable to parse JSON response: " + response);
+ done(new Error("Unable to parse JSON response: " + response));
+ return;
}
if (response.result == "error") {
- throw new Error("API returned error: " + response.message);
+ done(new Error("API returned error: " + response.message));
+ return;
}
}