error
[드림코딩] 콜백함수 (3) : promise로 Error Handling하기 (reject, catch 활용)
Error Handling const turnonLaptop = () => new Promise((resolve, reject) => { setTimeout(() => resolve(`노트북 실행.`), 1000); }); const loginBlog = blog => new Promise((resolve, reject) => { setTimeout(() => reject(new Error(`Error! ${blog} => 블로그 진입.`)), 1000); }); const writePost = post => new Promise ((resolve, reject) => { setTimeout(() => resolve(`${post} => 게시 완료.`), 1000); }); producer 코드를 작성했..