Fix uses of throws("message") to include an exception type.