summaryrefslogtreecommitdiff
path: root/scala-mode/try
diff options
context:
space:
mode:
Diffstat (limited to 'scala-mode/try')
-rw-r--r--scala-mode/try11
1 files changed, 11 insertions, 0 deletions
diff --git a/scala-mode/try b/scala-mode/try
new file mode 100644
index 0000000..b218af1
--- /dev/null
+++ b/scala-mode/try
@@ -0,0 +1,11 @@
+# -*- mode: snippet -*-
+#Author : Jonas Bonèr <jonas@jonasboner.com>
+#name : try { .. } catch { case e => ..}
+# key: try
+# --
+try {
+ $0
+} catch {
+ case ${1:e}: ${2:Exception} =>
+ ${1:println(\"ERROR: \" + e) // TODO: handle exception}\n}
+} \ No newline at end of file