Skip to content

Commit 0be1735

Browse files
authored
fix: 优化
1 parent 86189ab commit 0be1735

File tree

1 file changed

+3
-3
lines changed
  • 1-js/10-error-handling/1-try-catch/1-finally-or-code-after

1 file changed

+3
-3
lines changed

1-js/10-error-handling/1-try-catch/1-finally-or-code-after/solution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
当我们看函数中的代码时,差异就变得很明显了。
22

3-
如果在这儿有“跳出” `try..catch` 的行为,那么这两种方式的表现就不同了。
3+
如果在这有“跳出” `try..catch` 的行为,那么这两种方式的表现就不同了。
44

55
例如,当 `try...catch` 中有 `return` 时。`finally` 子句会在 `try...catch`**任意** 出口处起作用,即使是通过 `return` 语句退出的也是如此:在 `try...catch` 刚刚执行完成后,但在调用代码获得控制权之前。
66

@@ -27,10 +27,10 @@ f(); // cleanup!
2727
function f() {
2828
try {
2929
alert('start');
30-
throw new Error("an error");
30+
throw new Error("一个 error");
3131
} catch (err) {
3232
// ...
33-
if("can't handle the error") {
33+
if("无法处理此 error") {
3434
*!*
3535
throw err;
3636
*/!*

0 commit comments

Comments
 (0)