diff --git a/locator/token_metadata.cc b/locator/token_metadata.cc index 8db3129083..184cc164f4 100644 --- a/locator/token_metadata.cc +++ b/locator/token_metadata.cc @@ -206,7 +206,7 @@ void token_metadata::update_host_id(const UUID& host_id, inet_address endpoint) utils::UUID token_metadata::get_host_id(inet_address endpoint) { if (!_endpoint_to_host_id_map.count(endpoint)) { - std::runtime_error(sprint("host_id for endpoint %s is not found", endpoint)); + throw std::runtime_error(sprint("host_id for endpoint %s is not found", endpoint)); } return _endpoint_to_host_id_map.at(endpoint); }