You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2016/04/06 21:29:23 UTC

[2/2] cxf git commit: Update cxf-utils.js to throw the onerror handler on timeout This closes #126

Update cxf-utils.js to throw the onerror handler on timeout
This closes #126


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/210bd76e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/210bd76e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/210bd76e

Branch: refs/heads/3.1.x-fixes
Commit: 210bd76e9d2bed06e360005a9f099876621bd965
Parents: adb0ce5
Author: Jeroen van der Last <jl...@users.noreply.github.com>
Authored: Tue Apr 5 16:30:58 2016 +0200
Committer: Daniel Kulp <dk...@apache.org>
Committed: Wed Apr 6 15:29:17 2016 -0400

----------------------------------------------------------------------
 .../src/main/resources/org/apache/cxf/javascript/cxf-utils.js   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/210bd76e/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
----------------------------------------------------------------------
diff --git a/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js b/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
index a084d05..8c9f451 100644
--- a/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
+++ b/rt/javascript/javascript-rt/src/main/resources/org/apache/cxf/javascript/cxf-utils.js
@@ -745,6 +745,9 @@ function org_apache_cxf_client_request(url, requestXML, method, sync, headers)
 	this.req.onreadystatechange = function() {
 		requester.onReadyState();
 	}
+	this.req.onerror = function() {
+		requester.onReadyState();
+	}
 
 	// NOTE: we do not call the onerror callback for a synchronous error
 	// at request time. We let the request object throw as it will.
@@ -929,7 +932,7 @@ function org_apache_cxf_client_onReadyState() {
 						return;
 					}
 					if (this.onerror != null) {
-						this.onerror("Could not handle content of response.");
+						this.onerror(this, "Could not handle content of response.");
 						return;
 					}
 				}