diff --git a/lib/OpenLayers/Ajax.js b/lib/OpenLayers/Ajax.js index a15bc0a123..a75f8bf294 100644 --- a/lib/OpenLayers/Ajax.js +++ b/lib/OpenLayers/Ajax.js @@ -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); } });