We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b7dc39 commit 86189abCopy full SHA for 86189ab
1-js/10-error-handling/1-try-catch/1-finally-or-code-after/task.md
@@ -10,29 +10,29 @@ importance: 5
10
11
```js
12
try {
13
- work work
+ // 工作
14
} catch (err) {
15
- handle errors
+ // 处理 error
16
} finally {
17
*!*
18
- cleanup the working space
+ // 清理工作空间
19
*/!*
20
}
21
```
22
2. 第二个代码片段,将清空工作空间的代码放在了 `try...catch` 之后:
23
24
25
26
27
28
29
30
31
32
33
34
35
36
我们肯定需要在工作后进行清理,无论工作过程中是否有 error 都不影响。
37
38
-在这儿使用 `finally` 更有优势,还是说两个代码片段效果一样?如果在这儿有这样的优势,如果需要,请举例说明。
+在这儿使用 `finally` 更有优势,还是说两个代码片段效果一样?如果在这有这样的优势,如果需要,请举例说明。
0 commit comments