more improvements to tests for exceptions