Inflearn brand logo image

Inflearn Community Q&A

sam's profile image
sam

asked

Web Crawling with Node.js

(Grammar Lecture) async/await

throw new Error

Written on

·

350

0

개별적인 try...catch보다 throw new Error(...)를 쓰면 좋지 않나요?

javascriptpuppeteernodejs웹-크롤링

Answer 2

1

zerocho님의 프로필 이미지
zerocho
Instructor

그렇 throw한 new Error을 어딘가에서 catch로 다시 받아야 합니다. 그리고 throw 는 return의 의미도 있어서 다음 로직들이 중단됩니다.

0

sam님의 프로필 이미지
sam
Questioner

감사합니다.

sam's profile image
sam

asked

Ask a question