//只能出现再异步函数中 暂停异步函数得执行 async function fn() { throw '发生勒一些错误'; return 123; } //console.log(fn()) fn().then(function(data) { console.log(data); }).catch(function(err) { console.log(err); })
//只能出现再异步函数中 暂停异步函数得执行 async function fn() { throw '发生勒一些错误'; return 123; } //console.log(fn()) fn().then(function(data) { console.log(data); }).catch(function(err) { console.log(err); })
你好,我是AI助理
可以解答问题、推荐解决方案等