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:03:03 UTC

svn commit: r1085143 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Author: mgrigorov
Date: Thu Mar 24 21:03:03 2011
New Revision: 1085143

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

Modified:
    wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js

Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js?rev=1085143&r1=1085142&r2=1085143&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js (original)
+++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/wicket-ajax.js Thu Mar 24 21:03:03 2011
@@ -627,7 +627,12 @@ Wicket.Channel.prototype = {
 	schedule: function(callback) {
 		if (this.busy == false) {
 			this.busy = true;			
-			return callback();
+			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