当前位置:网站首页>Try catch cannot catch asynchronous errors
Try catch cannot catch asynchronous errors
2022-04-23 07:03:00 【NOyesNONO_】
try{
setTimeout(()=>{
throw new Error(' Error message ')
},10)
}catch(e){
console.loe(e)
}

Need to be in throw new Error External direct addition try catch
try{
setTimeout(()=>{
try{
throw new Error(' Error message ')
}catch(e){
console.log(e,'1')
}
},10)
}catch(e){

Reference source :
https://www.cnblogs.com/zhansu/p/11050641.html
版权声明
本文为[NOyesNONO_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230601165442.html
边栏推荐
- [shell script exercise] batch add the newly added disks to the specified VG
- Prometheus的relabel_configs和metric_relabel_configs解释及用法示例
- Common views of Oracle database performance analysis
- 异常记录-5
- SQL学习|复杂查询
- Redis practice notes and source code analysis
- 基于EMR离线数据分析-反馈有礼
- prometheus告警记录持久化(历史告警保存与统计)
- Introduction to RDMA
- 异常记录-16
猜你喜欢
随机推荐
Prometheus的relabel_configs和metric_relabel_configs解释及用法示例
[MySQL basics] data export and import permissions and local_ Infile parameter
基于EMR离线数据分析-反馈有礼
冬季实战营动手实战-上云必备环境准备,动手实操快速搭建LAMP环境 领鼠标 云小宝 背包 无影
【MySQL基础篇】数据导出导入权限与local_infile参数
How to use DBA_ hist_ active_ sess_ History analysis database history performance problems
[Lombok quick start]
异常记录-18
【MySQL基础篇】启动选项、系统变量、状态变量
Basic concepts of database: OLTP / OLAP / HTAP, RPO / RTO, MPP
The arithmetic square root of X in leetcode
JS performance optimization
如何通过dba_hist_active_sess_history分析数据库历史性能问题
异常记录-12
Oracle net service: listener and service name resolution method
[MySQL basics] startup options and configuration files
Construire un blog Cloud basé sur ECS (bénédiction sur le Code Cloud Xiaobao, explication détaillée de la tâche iphone13 gratuite)
搭建基于OSS的图片分享网站-反馈有礼
Openvswitch compilation and installation
SQL学习|基础查询与排列








