Skip to content

Replace New-TerminatingError with DscResource.Common error functions #105

@coderabbitai

Description

@coderabbitai

Description

The current implementation includes a custom New-TerminatingError function in the DhcpServerDsc.Common module. This should be replaced with the standardized error helper functions available in DscResource.Common.

Background

As per DSC Community guidelines, we should check DscResource.Common before creating private functions. The DscResource.Common module provides several error helper functions such as:

  • New-InvalidDataException
  • New-ArgumentException
  • New-InvalidOperationException
  • New-ObjectNotFoundException
  • New-InvalidResultException
  • New-NotImplementedException

Tasks

  • Review usage of New-TerminatingError in DhcpServerDsc.Common
  • Replace with appropriate DscResource.Common error functions
  • Update unit tests accordingly
  • Remove the custom New-TerminatingError function

References

Requested by: @dan-hughes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.help 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