Promise Error Handling ç´æãããã¨ã©ã¼ Promiseã¨ã¨ã©ã¼ã®åºæ¬ Promiseå ã§èµ·ããä¾å¤ã¯èªåã§ãã£ããããã ã¨ã©ã¼å¦çã¯.catch(fn)ã§è¡ã var promise = new Promise(function(){ throw new Error("ä¾å¤"); }); promise.catch(function(error){ // ä¾å¤ããã£ããã§ãã }); ããããåé¡ .catch(fn) ãããªãã¨ã¨ã©ã¼ãã°ãåºããªã .catch(fn) ãããããã¦ã¨ã©ã¼ã®æ¡ãã¤ã¶ããèµ·ãã = unhandled rejectionã(.catchããã¦ãªãpromise) 4.6. Promise.prototype.done ã¨ã¯ä½ã? ç¾ç¶ã®unhandled rejectionã¸ã®å¯¾å¿ unhandled rejectionãçºçãã
{{#tags}}- {{label}}
{{/tags}}