Using the constant type in the error messages