Use more of Exception's default behavior
Use a class decorator to add enum values to classes
Rename helper function