The fact is that, when I convert a string to an enum it is typically because 
I'm deserializing a value that comes from a file my program previously wrote or 
from the network because I received it from a webservice (which is the case of 
this example), I'm not reading user input, so the else case doesn't actually 
ever happen unless I have a huge bug in my code, in which case I'm perfectly 
fine with the whole process to crash XD

Only when I really have to validate the string (e.g. user typed the value in a 
text field) I need to enclose the conversion in a try block

Reply via email to