try{
$.ajax({
url:'ajax.php',
type: "POST",
data: "name=John&location=Boston",
success: function(msg){
if(msg.error == '0')throw(error);<=uncaught exception: [object Object]
}
});
}catch(e){
alert(e);}为什么我捕获不了异常
uncaught exception: [object Object]为什么在success属性没办法抛异常呀异常
$.ajax({
url:'ajax.php',
type: "POST",
data: "name=John&location=Boston",
success: function(msg){
if(msg.error == '0')throw(error);<=uncaught exception: [object Object]
}
});
}catch(e){
alert(e);}为什么我捕获不了异常
uncaught exception: [object Object]为什么在success属性没办法抛异常呀异常
}