You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/06/21 20:26:18 UTC

svn commit: r1138118 - /tapestry/tapestry5/branches/maint-5-2/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

Author: hlship
Date: Tue Jun 21 18:26:18 2011
New Revision: 1138118

URL: http://svn.apache.org/viewvc?rev=1138118&view=rev
Log:
TAP5-1368: The onFailure function provided to Tapestry.ajaxRequest does not always get invoked

Modified:
    tapestry/tapestry5/branches/maint-5-2/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

Modified: tapestry/tapestry5/branches/maint-5-2/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/branches/maint-5-2/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=1138118&r1=1138117&r2=1138118&view=diff
==============================================================================
--- tapestry/tapestry5/branches/maint-5-2/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js (original)
+++ tapestry/tapestry5/branches/maint-5-2/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js Tue Jun 21 18:26:18 2011
@@ -367,6 +367,8 @@ var Tapestry = {
 		Tapestry.error(Tapestry.Messages.communicationFailed + exception);
 
 		Tapestry.debug(Tapestry.Messages.ajaxFailure + exception, response);
+		
+		throw exception;
 	},
 
 	/**
@@ -427,7 +429,7 @@ var Tapestry = {
 				 * to mean the server didn't respond.
 				 */
 				if (!response.getStatus() || !response.request.success()) {
-					Tapestry.error(Tapestry.Messages.ajaxRequestUnsuccessful);
+					finalOptions.onFailure.call(this, response);
 					return;
 				}