📜  等待和捕获 javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:19.703000             🧑  作者: Mango

代码示例2
var response = await promisedFunction().catch((err) => { console.error(err); });
// response will be undefined if the promise is rejected
// this will work instead of using try...catch...