ajax error sink

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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});
});

Comments

(Forgotten your password?)

You may use Markdown syntax here, but raw HTML will be removed.