format and error message