Applying fredj's patch for #534, allowing Ajax exceptions to fall through and
be rethrown if the Ajax object doesn't have an onException callback set. This should make Ajax errors a bit more obvious when they occur. git-svn-id: http://svn.openlayers.org/trunk/openlayers@3283 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -301,7 +301,14 @@ OpenLayers.Ajax.Request.prototype = OpenLayers.Class.inherit( OpenLayers.Ajax.Ba
|
||||
},
|
||||
|
||||
dispatchException: function(exception) {
|
||||
(this.options.onException || OpenLayers.Ajax.emptyFunction)(this, exception);
|
||||
if (this.options.onException) {
|
||||
this.options.onException(this, exception);
|
||||
} else {
|
||||
// if we get here, Responders.dispatch('onException') will never
|
||||
// be called. too bad. we should probably take out the Responders
|
||||
// stuff anyway.
|
||||
throw exception;
|
||||
}
|
||||
OpenLayers.Ajax.Responders.dispatch('onException', this, exception);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user