_(slightly off topic by not addressing directly the case statement, but I think 
this is the heart of the issue)_

If there was an "Invalid" role, which is the "else" case, 
    
    
    type
        Roles = enum
            invalid,user,catering,manager,sysadmin
    

then the consumer of this converter could test and handle that themselves via 
the "role" rather than via exception handling.

But which approach is the preferred approach?

Reply via email to