function error_sink(req, msg, err_obj){ var context = { url: this.url }; context["data"] = this.data; context["timeout"]= this.timeout; context["msg"] = msg; context["error"] = err_obj; context["time"] = Date().toString(); jQuery.get('/ajax/error-sink/', jQuery.param({ context: jQuery.param(context) })); }; jQuery(function($){ $.ajaxSetup({error: error_sink}); });