I have a ajax
function which will call a function if its error
and this error will call a function which displays the error message. here is the code
function Update_uam() {
$.ajax({
type: "POST",
url: "IROA_StoredProcedures.asmx/update_uam1",
data: "",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function () {
console.log(tbody);
},
error: errorHandler
});
}
function errorHandler(XMLHttpRequest) {
console.log(errorHandler.caller.caller);
console.log(XMLHttpRequest);
}
I tried several ways but seems to failed. What I want to do is also displays which function the error comes from for easy debugging.