make error reporting consistent