What type of exception will the enum value of java throw?
In Winter 22 we are getting a long desired (if somewhat niche) feature: Use the valueOf() Enum Method to Convert a Specified String to an Enum Constant Value
The valueOf() enum method converts a specified string to an enum constant value. An exception is thrown if the input string doesn’t match an enum value. In previous releases, using this method resulted in a runtime error.
What type of exception specifically is thrown?
The exception that the enum value of java throw is a System.NoSuchElementException in the prerelease edition of Winter '22, so that is likely what it will be in the release.