[Mapbender-commits] r6583 - trunk/mapbender/lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jul 8 05:29:54 EDT 2010


Author: christoph
Date: 2010-07-08 09:29:54 +0000 (Thu, 08 Jul 2010)
New Revision: 6583

Modified:
   trunk/mapbender/lib/ajax.js
Log:
error code is now also passed to listener as fourth argument

Modified: trunk/mapbender/lib/ajax.js
===================================================================
--- trunk/mapbender/lib/ajax.js	2010-07-07 16:56:18 UTC (rev 6582)
+++ trunk/mapbender/lib/ajax.js	2010-07-08 09:29:54 UTC (rev 6583)
@@ -187,6 +187,9 @@
 	// Did the session expire
 	var sessionExpired = false;
 	
+	// error code of the reply
+	var errorCode;
+	
 	// Checks if the response is valid.
 	var receive = function (json, status) {
 		if (!json) {
@@ -218,6 +221,7 @@
 				sessionExpired = true;
 			}
 			new Mapbender.Warning(message);
+			errorCode = resultObj.error.code;
 			return;
 		}
 
@@ -273,10 +277,10 @@
 					return;
 				}
 				if (scope !== null) {
-					callback.apply(scope, [result, success, message]);
+					callback.apply(scope, [result, success, message, errorCode]);
 				}
 				else {
-					callback(result, success, message);
+					callback(result, success, message, errorCode);
 				}
 			}
 		};



More information about the Mapbender_commits mailing list