print constant names instead of codes in error messages