|

楼主 |
发表于 2016-5-24 17:17:21
|
显示全部楼层
"complete" : function(xhr) {
if (xhr.readyState == 4 && xhr.status == 200) {
if (options.success) {
options.success.call(this, xhr.responseJSON, xhr);
}
} else {
var msg = self.getErrorMsg(xhr);
if (options.error) {
options.error.call(this, msg, xhr);
} else {
if(!window.showDebug){
self.showError(msg);
}else{
console.log(msg);
}
}
}
},
保存失败会走options.error自定义的错误回掉方法,
错误回掉方法中要手动爆出异常throw new error("arguments are not numbers");吗
但是还会打印none呢
怎么让错误了不往下执行 |
|