Skip to content

Make Enum.from_value raise ArgumentError instead of Exception#15624

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:feature/enum-from_value-exception
Apr 18, 2025
Merged

Make Enum.from_value raise ArgumentError instead of Exception#15624
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:feature/enum-from_value-exception

Conversation

@HertzDevil
Copy link
Contributor

Aligns the exception type with the similar Enum.parse.

@straight-shoota straight-shoota self-assigned this Apr 2, 2025
@straight-shoota straight-shoota added this to the 1.17.0 milestone Apr 15, 2025
@straight-shoota straight-shoota added the breaking-change May have breaking effect in some edge cases. Mostly negligible, but still noteworthy. label Apr 15, 2025
@straight-shoota straight-shoota merged commit cf469e7 into crystal-lang:master Apr 18, 2025
37 checks passed
@HertzDevil HertzDevil deleted the feature/enum-from_value-exception branch April 23, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change May have breaking effect in some edge cases. Mostly negligible, but still noteworthy. kind:chore topic:stdlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants