You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/11-async/02-promise-basics/article.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -274,13 +274,13 @@ new Promise((resolve, reject) => {
274
274
275
275
Єдиним винятком із цього правила є випадки, коли обробник `finally` видає помилку. Бл потім ця помилка переходить до наступного обробника замість будь-якого попереднього результату проміса.
276
276
277
-
To summarize:
277
+
У підсумку:
278
278
279
-
- A `finally` handler doesn't get the outcome of the previous handler (it has no arguments). This outcome is passed through instead, to the next suitable handler.
280
-
- If a `finally` handler returns something, it's ignored.
281
-
- When `finally` throws an error, then the execution goes to the nearest error handler.
279
+
- Обробник `finally` не отримує результат попереднього обробника (у нього немає аргументів). Замість цього цей результат передається наступному підходящому обробнику.
280
+
- Якщо обробник `finally` щось повертає, це буде ігноруватися.
281
+
- Якщо виникає помилка в `finally`, виконання переходить до найближчого обробника помилок.
282
282
283
-
These features are helpful and make things work just the right way if we use `finally` how it's supposed to be used: for generic cleanup procedures.
283
+
Ці особливості є корисними і забезпечують правильну роботу, якщо ми використовуємо `finally` так, як це передбачено: для загальних процедур очищення.
0 commit comments