diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc index 07e2edc68563c..7b1496c98cd5f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc @@ -135,7 +135,7 @@ std::vector HdfsConfiguration::LookupNameService(const std::string URI uri; try { uri = URI::parse_from_string(PrependHdfsScheme(Get(dom_node_name))); - } catch (const uri_parse_error) { + } catch (const uri_parse_error&) { throw ha_parse_error("unable to find " + dom_node_name); } @@ -148,7 +148,7 @@ std::vector HdfsConfiguration::LookupNameService(const std::string NamenodeInfo node(nameservice, *node_id, uri); namenodes.push_back(node); } - } catch (ha_parse_error e) { + } catch (const ha_parse_error& e) { LOG_ERROR(kRPC, << "HA cluster detected but failed because : " << e.what()); namenodes.clear(); // Don't return inconsistent view }