Adding support for testing exceptions.