Skip to content

Commit 07389c6

Browse files
ybiquitousAndreaCrotti
authored andcommitted
add 'try...catch' statement snippet to js-mode (AndreaCrotti#227)
* add 'try...catch' statement snippet to js-mode For details, see below link: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch * change variable name from `e` to `err` for Error object
1 parent 29ce99b commit 07389c6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

snippets/js-mode/try-catch

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# -*- mode: snippet; require-final-newline: nil -*-
2+
# name: try...catch statement
3+
# key: try
4+
# --
5+
try {
6+
$1
7+
} catch (err) {
8+
$2
9+
}${3: finally {
10+
$4
11+
}}

0 commit comments

Comments
 (0)