当前位置:网站首页>Es6--- two methods of capturing promise status as failed
Es6--- two methods of capturing promise status as failed
2022-07-06 15:27:00 【Cirrod】
1.try cath Method
async fn() {
try {
await promise object
} catch (err) {
console.log(err)// Capture failed promise
}
}2. adopt promise The built-in .catch() Method
async fn() {
await promise object .catch(err => {
console.log(err)// Capture failed promise
})
}边栏推荐
- C4D quick start tutorial - Introduction to software interface
- csapp shell lab
- 線程及線程池
- Flex --- detailed explanation of flex layout attributes
- Leetcode simple question: check whether the numbers in the sentence are increasing
- The wechat red envelope cover designed by the object is free! 16888
- 学习记录:USART—串口通讯
- UCORE lab5 user process management experiment report
- LeetCode#2062. Count vowel substrings in strings
- What are the software testing methods? Show you something different
猜你喜欢

JS --- BOM details of JS (V)

Video scrolling subtitle addition, easy to make with this technique

LeetCode#237. Delete nodes in the linked list
How to do agile testing in automated testing?
Knowledge that you need to know when changing to software testing

Stm32 dossiers d'apprentissage: saisie des applications

UCORE lab5 user process management experiment report

In Oracle, start with connect by prior recursive query is used to query multi-level subordinate employees.

几款开源自动化测试框架优缺点对比你知道吗?

Leetcode notes - dynamic planning -day7
随机推荐
LeetCode#198. raid homes and plunder houses
软件测试面试要问的性能测试术语你知道吗?
Dlib detects blink times based on video stream
UCORE lab1 system software startup process experimental report
ucore lab1 系统软件启动过程 实验报告
Want to change jobs? Do you know the seven skills you need to master in the interview software test
Jupyter installation and use tutorial
ArrayList set
全网最详细的postman接口测试教程,一篇文章满足你
ucore Lab 1 系统软件启动过程
UCORE lab5 user process management experiment report
软件测试面试回答技巧
The minimum sum of the last four digits of the split digit of leetcode simple problem
csapp shell lab
Sorting odd and even subscripts respectively for leetcode simple problem
Take you to use wxpy to create your own chat robot (plus wechat interface basic data visualization)
LeetCode#2062. Count vowel substrings in strings
Scoring system based on 485 bus
Iterators and generators
UCORE lab7 synchronous mutual exclusion experiment report