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
This commit is contained in:
ybiquitous 2017-10-11 04:24:37 +09:00 committed by Andrea Crotti
parent 29ce99b841
commit 07389c6723
1 changed files with 11 additions and 0 deletions

View File

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