Prevent HTML error pages being spewed in case of errors generated while running tests.
Merge pull request #3034 from ADmad/3.0-cli-error

Prevent HTML error pages being spewed in case of errors generated while ...