Add more tests for exceptions.