test for exceptions