Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/ECMAScript/
JavaScript
JavaScript
/JS Fundamental/JS Promise/JS Promise Function/
Promise.prototype.catch
Search

Promise.prototype.catch

  • .catch
Promise.prototype.catch()
The catch() method returns a Promise and deals with rejected cases only. It behaves the same as calling Promise.prototype.then(undefined, onRejected) (in fact, calling obj.catch(onRejected) internally calls obj.then(undefined, onRejected)). This means that you have to provide an onRejected function even if you want to fall back to an undefined result value - for example obj.catch(() = {}).
Promise.prototype.catch()
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch
Promise.prototype.catch()

Recommendations

Texonom
Texonom
/
Engineering
Engineering
/Software Engineering/Programming/Programming Language/Programming Languages/4GL/ECMAScript/
JavaScript
JavaScript
/JS Fundamental/JS Promise/JS Promise Function/
Promise.prototype.catch
Copyright Seonglae Cho