Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0602b33

Browse files
authoredSep 17, 2016
Remove [System.Exception] from try snippets. (#297)
After long discussion on PSMVP alias it seems that there's a bug with catch [System.Exception]. If there are two catch statements and the "general" case uses "catch [System.Exception" instead of "catch" the general case will run instead of the more specific exception!! That's pretty mind blowing. Fix #296
1 parent 0f9c627 commit 0602b33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎snippets/PowerShell.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@
729729
"try {",
730730
"\t$0",
731731
"}",
732-
"catch [${exception:System.Exception}] {",
732+
"catch {",
733733
"\t",
734734
"}"
735735
],
@@ -741,7 +741,7 @@
741741
"try {",
742742
"\t$0",
743743
"}",
744-
"catch [${exception:System.Exception}] {",
744+
"catch {",
745745
"\t",
746746
"}",
747747
"finally {",

0 commit comments

Comments
 (0)
Please sign in to comment.