1
다음 코드는 잘 작동 :ES6 구문 :이 오류는 무엇입니까? .catch (err => throw err);
내가 같은 다시 포맷 할 때 노드에 오류가 발생하지만pool.getConnection()
.then((conn)=>{
// something here
})
.catch((err) => {
throw err;
});
:
return pool.getConnection()
.then((conn) => {
//something here
})
.then(results => results[0].insertId)
.catch(err => throw err); <-- NODE COMPALINS HERE
$>somefile.js line(190)
.catch(err => throw err);
^^^^^
SyntaxError: Unexpected token throw
내가 여기서 무엇을 놓치고?