Last active
May 11, 2018 18:14
-
-
Save ZYinMD/db00b7b1c1d2b1b4819f78ee5f6c48bd to your computer and use it in GitHub Desktop.
JavaScript try...catch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Documentation: http://docs.sublimetext.info/en/latest/extensibility/snippets.html --> | |
<!-- Clone or save this code as js-try-catch.sublime-snippet into Data/Packages/User. No need to restart Sublime. | |
(If you Copy-Paste-SaveAs... with Sublime, be careful not to save as .xml. It's actually hard not to) --> | |
<!-- Use tabs in this file, not spaces --> | |
<snippet> | |
<content> | |
<![CDATA[ | |
try { | |
${1:} | |
} | |
catch(error) { | |
console.error(error); | |
} | |
]]> | |
</content> | |
<!-- Set a tabTrigger: how to trigger the snippet --> | |
<tabTrigger>try</tabTrigger> | |
<!-- Optional: Set a description for the tabTrigger --> | |
<description>try...catch</description> | |
<!-- Optional: Set a scope to limit the file types where this snippet will trigger --> | |
<scope>text.html, text.plain, source.js</scope> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment