SmartEnum icon indicating copy to clipboard operation
SmartEnum copied to clipboard

FromValue documentation specifies that the wrong exception is thrown

Open Asafima opened this issue 1 year ago • 0 comments

In FromValue method, documentation says KeyNotFoundException is thrown if the value is not found, whereas source code actually shows a more specific exception is thrown.

Documentation should specify that a SmartEnumNotFoundException is thrown.

FromValue method: image

image

Source code: https://github.com/ardalis/SmartEnum/blob/c3f8e569bf3ab700eed94390db212711f8324321/src/SmartEnum/SmartEnum.cs#L216

Asafima avatar Jun 22 '24 12:06 Asafima