use an exception should be thrownBy