Skip to content

[BUG] - Docs for Ubiquity.NET.Extensions.ValidationExtensions.ThrowIfNotDefined() lists invalid exception #292

@smaillet

Description

@smaillet

Please provide the following information when submitting an issue.
.NET Framework Used:

  • .NET 9.0
  • Something else

OS Environment:

  • Windows 10
  • Windows 10 IoT Core
  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows Server 2016

OS Version: ####.####...
I have already...

  • Reproduced the problem using the latest stable release.
  • Reviewed the documentation.
  • Reviewed the current issues to check that the issue isn't already known.

Description:
Provide a clear and concise description of what the bug is.

Steps to reproduce the problem:

  • Reviewed the documentation.
  • Included Sample code or link to repository/gist to reproduce the bug (This is the fastest way to a resolution as it reduces the time to reproduce the problem. The smaller the sample is the better.)

Ubiquity.NET.Extensions.ValidationExtensions.ThrowIfNotDefined() documentation lists ArgumentOutOfRangeException but in fact uses InvalidEnumArgumentException

Expected Behavior
Docs reflect reality and actual implementation is sensible. In this case the InvalidEnumArgumentException is sensible.

Actual Behavior
Docs declare an exception that is incorrect.

Additional context
The creation of the expression does not use the overload of the constructor that reports the invalid value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsBugDocumentation related bugs

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions