You want to catch the specific exception that is expected, not all of them!  That will also catch AssertionError...