yasnippet-snippets/snippets/js-mode/try-catch
ybiquitous 07389c6723 add 'try...catch' statement snippet to js-mode (#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
2017-10-10 20:24:37 +01:00

11 lines
No EOL
153 B
Text

# -*- mode: snippet; require-final-newline: nil -*-
# name: try...catch statement
# key: try
# --
try {
$1
} catch (err) {
$2
}${3: finally {
$4
}}