-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement
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
Metadata
Metadata
Assignees
Labels
area:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcbetter-errorsIssues concerned with improving confusing/unhelpful diagnostic messagesIssues concerned with improving confusing/unhelpful diagnostic messagesitype:enhancement