Patch from funky_c to move all alert()s in the library to a single
OpenLayers.Console.userError function. This allows for easy overriding of this function for people who need to report errors at an application level (or hiding these errors entirely), with the same default behavior as previous releases. Patch from funky_c, r=me, (Closes #1651) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7675 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -38,7 +38,7 @@ OpenLayers.ProxyHost = "";
|
||||
* @param {} request
|
||||
*/
|
||||
OpenLayers.nullHandler = function(request) {
|
||||
alert(OpenLayers.i18n("unhandledRequest", {'statusText':request.statusText}));
|
||||
OpenLayers.Console.userError(OpenLayers.i18n("unhandledRequest", {'statusText':request.statusText}));
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -55,13 +55,13 @@ OpenLayers.nullHandler = function(request) {
|
||||
* onComplete - {Function} Optional callback for success. The callback
|
||||
* will be called with this set to caller and will receive the request
|
||||
* object as an argument. Note that if you do not specify an onComplete
|
||||
* function, <OpenLayers.nullHandler> will be called (which pops up an
|
||||
* alert dialog).
|
||||
* function, <OpenLayers.nullHandler> will be called (which pops up a
|
||||
* user friendly error message dialog).
|
||||
* onFailure - {Function} Optional callback for failure. In the event of
|
||||
* a failure, the callback will be called with this set to caller and will
|
||||
* receive the request object as an argument. Note that if you do not
|
||||
* specify an onComplete function, <OpenLayers.nullHandler> will be called
|
||||
* (which pops up an alert dialog).
|
||||
* (which pops up a user friendly error message dialog).
|
||||
*
|
||||
* Returns:
|
||||
* {<OpenLayers.Request.XMLHttpRequest>} The request object. To abort loading,
|
||||
|
||||
Reference in New Issue
Block a user