Skip to content

Remove-SqlDscRole: Use $PSCmdlet.ThrowTerminatingError for terminating errors #2199

@johlju

Description

@johlju

Problem description

The command uses the following exception helper:

  • New-InvalidOperationException

This should be replaced with $PSCmdlet.ThrowTerminatingError for proper terminating errors.

Verbose logs

n/a

How to reproduce

n/a

Expected behavior

n/a

Current behavior

n/a

Suggested solution

Replace all uses of exception helpers with $PSCmdlet.ThrowTerminatingError and provide appropriate ErrorRecords.

Operating system the target node is running

n/a

PowerShell version and build the target node is running

n/a

Module version used

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.good first issueThe issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHubhelp wantedThe issue is up for grabs for anyone in the community.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions