js中6种错误
http://javascript.ruanyifeng.com/grammar/error.html#toc5
https://www.jianshu.com/p/467b9a145dcc
try cache
try {
console.log(x);
}catch (e) {
console.dir(e);
}
console.log('还可以执行')
try {
console.log(x);
}catch (e) {
console.dir(e);
throw new Error('手动抛出错误,终止代码执行')
}
console.log('程序被终止了,无法执行')
原文地址:https://www.cnblogs.com/iiiiiher/p/9815587.html
时间: 2024-11-05 23:32:05