Changed how unit tests handle exceptions.