Skip to content

catch [RuntimeException] { ... } is essentially catch all exceptions #8340

@daxian-dbw

Description

@daxian-dbw

Summary of the new document or enhancement

Description of what to update

In practice, catch [System.Management.Automation.RuntimeException] { ... } behaves the same as an unqualified catch block. That is, it catches any exception. Reason for that is explained in PowerShell/PowerShell#16392 (comment).

It would be good to document this behavior in our help content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue-doc-ideaIssue - request for new content

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions