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:
@@ -86,6 +86,21 @@ OpenLayers.Console = {
|
||||
* object - {Object}
|
||||
*/
|
||||
error: function() {},
|
||||
|
||||
/**
|
||||
* APIFunction: userError
|
||||
* A single interface for showing error messages to the user. The default
|
||||
* behavior is a Javascript alert, though this can be overridden by
|
||||
* reassigning OpenLayers.Console.userError to a different function.
|
||||
*
|
||||
* Expects a single error message
|
||||
*
|
||||
* Parameters:
|
||||
* object - {Object}
|
||||
*/
|
||||
userError: function(error) {
|
||||
alert(error);
|
||||
},
|
||||
|
||||
/**
|
||||
* APIFunction: assert
|
||||
|
||||
Reference in New Issue
Block a user