You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2011/03/24 22:01:30 UTC

svn commit: r1085142 - /wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Author: mgrigorov
Date: Thu Mar 24 21:01:30 2011
New Revision: 1085142

URL: http://svn.apache.org/viewvc?rev=1085142&view=rev
Log:
WICKET-3553 Reset the busy flag in Wicket.Channel if the execution of the callback fails for some reason


Modified:
    wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=1085142&r1=1085141&r2=1085142&view=diff
==============================================================================
--- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original)
+++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Thu Mar 24 21:01:30 2011
@@ -625,8 +625,13 @@ Wicket.Channel.prototype = {
 	
 	schedule: function(callback) {
 		if (this.busy == false) {
-			this.busy = true;			
-			return callback();
+			this.busy = true;	
+			try {		
+				return callback();
+			} catch (exception) {
+				this.busy = false;
+				Wicket.Log.error("An error occurred while executing Ajax request:" + exception);
+			}
 		} else {
 			Wicket.Log.info("Channel busy - postponing...");
 			if (this.type == 's') // stack