Closed
Description
Compiler version
3.3.1
Minimized example
enum Foo:
case A
Foo.fromOrdinal(3)
Foo.valueOf("Bar")
Output Error/Warning message
fromOrdinal
java.util.NoSuchElementException: 3
valueOf
java.lang.IllegalArgumentException: enum case not found: Bar
Why this Error/Warning was not helpful
It does not state from which enum the error has originated, making it harder to track it down.
Suggested improvement
fromOrdinal:
java.util.NoSuchElementException: enum `Foo` has no case with ordinal: 3
valueOf
java.lang.IllegalArgumentException: enum `Foo` has no case with value: Bar