Author: hlship
Date: Tue Jun 21 18:17:25 2011
New Revision: 1138116

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

Modified:
    
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js

Modified: 
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=1138116&r1=1138115&r2=1138116&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
 Tue Jun 21 18:17:25 2011
@@ -375,6 +375,8 @@ var Tapestry = {
                Tapestry.error(Tapestry.Messages.communicationFailed + 
exception);
 
                Tapestry.debug(Tapestry.Messages.ajaxFailure + exception, 
response);
+               
+               throw exception;
        },
 
        /**
@@ -435,7 +437,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;
                                }
 


Reply via email to