We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 216645d + f53cc38 commit 7c22919Copy full SHA for 7c22919
1 file changed
docs/Rules/MissingTryBlock.md
@@ -10,9 +10,13 @@ title: MissingTryBlock
10
11
## Description
12
13
-The `catch` and `finally` blocks should be preceded by a `try` block.
14
-Otherwise, the `catch` and `finally` blocks will be interpreted as commands, which is likely a mistake and
15
-will result in a "*The term 'catch' is not recognized as a name of a cmdlet*" error at runtime.
+The `catch` and `finally` blocks must be preceded by a `try` block. Without a `try` block, the
+`catch` and `finally` are interpreted as commands and result in a runtime error, such as:
+
16
+> "The term 'catch' is not recognized as a name of a cmdlet"
17
18
+This rule identifies instances where `catch` or `finally` blocks are present with out an associated
19
+`try` block.
20
21
## How
22
0 commit comments