From b753823786ea0b3c81d0a9427bdc029963899314 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Wed, 14 Aug 2019 08:03:01 +0300 Subject: [PATCH] minor --- 1-js/11-async/04-promise-error-handling/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/11-async/04-promise-error-handling/article.md b/1-js/11-async/04-promise-error-handling/article.md index 7e65de2d..624c7e81 100644 --- a/1-js/11-async/04-promise-error-handling/article.md +++ b/1-js/11-async/04-promise-error-handling/article.md @@ -140,7 +140,7 @@ new Promise((resolve, reject) => { } }).then(function() { - /* doesn't runs here */ + /* doesn't run here */ }).catch(error => { // (**) alert(`The unknown error has occurred: ${error}`); @@ -166,7 +166,7 @@ new Promise(function() { In case of an error, the promise becomes rejected, and the execution should jump to the closest rejection handler. But there is none. So the error gets "stuck". There's no code to handle it. -In practice, just like with a regular unhandled errors in code, it means that something has terribly gone wrong. +In practice, just like with regular unhandled errors in code, it means that something has terribly gone wrong. What happens when a regular error occurs and is not caught by `try..catch`? The script dies with a message in console. Similar thing happens with unhandled promise rejections.