Skip to content

Commit 281c851

Browse files
committed
Improve java snippets
1 parent 0e89f1d commit 281c851

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

neosnippets/java.snip

+8-1
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,17 @@ alias de
7979
snippet try
8080
try {
8181
${0:TARGET}
82-
} catch (${1:#:Exception} ${2:e}) {
82+
} catch (${1:Exception} ${2:e}) {
8383
${3:e.printStackTrace();}
8484
}
8585

86+
snippet try_resources
87+
try (${1:#:Resources}){
88+
${0:TARGET}
89+
} catch (${2:Exception} ${3:e}) {
90+
${4:e.printStackTrace();}
91+
}
92+
8693
snippet try_finally
8794
try {
8895
${0:TARGET}

0 commit comments

Comments
 (0)