added a way to test exceptions