Support exceptions in new testing framework