pdevito3 / QueryKit

🎛️ QueryKit is a .NET library that makes it easier to query your data by providing a fluent and intuitive syntax for filtering and sorting.
Apache License 2.0
152 stars 13 forks source link

fix: catch invalid enums #28

Closed jthomperoo closed 6 months ago

jthomperoo commented 7 months ago

Resolves #27.

Switches out Enum.Parse for Enum.TryParse and throws an exception if the enum parsing fails rather than a System.ArgumentException.

Catches the InvalidOperationException and re-throws it as a ParserException for consistency with the other exceptions.