Created
October 18, 2017 19:16
-
-
Save iricigor/e59e2d38be9af5781d38bd80b12170f8 to your computer and use it in GitHub Desktop.
Continue vs Finally in PowerShell
This file contains 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
for ($i=-1;$i -lt 2; $i++) { | |
try { | |
"`nTry $i" | |
1/$i | out-null | |
} catch { | |
"Catch $i" | |
continue | |
} finally { | |
"Finally $i" | |
} | |
"Out $i" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment