Improve error reporting

fixes #8136
refs #6070