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:28:13 UTC

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

Repository: cxf
Updated Branches:
  refs/heads/master 27a7508f0 -> 3a461f1db


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/3a461f1d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3a461f1d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3a461f1d

Branch: refs/heads/master
Commit: 3a461f1db7b51fa47a895dadb1b0df2830ce9ca5
Parents: 27a7508
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:14:11 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/3a461f1d/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;
 					}
 				}