changes to error messages
changed raise error