Skip to content

Commit 25cc0c7

Browse files
committed
catch exceptions by reference
1 parent 519239f commit 25cc0c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Bundle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ std::vector<std::string> Bundle::loadDependenciesFromYAML(const std::string &con
563563
YAML::Node node;
564564
try{
565565
node = YAML::LoadFile(config_file);
566-
}catch(std::runtime_error ex){
566+
}catch(std::runtime_error& ex){
567567
LOG_FATAL_S << "Could not parse bundle config file " << config_file <<
568568
": " << ex.what();
569569
throw(ex);
@@ -574,7 +574,7 @@ std::vector<std::string> Bundle::loadDependenciesFromYAML(const std::string &con
574574
if(node["bundle"] && node["bundle"]["dependencies"]){
575575
deps = node["bundle"]["dependencies"].as<std::vector<std::string>>();
576576
}
577-
}catch(std::runtime_error ex){
577+
}catch(std::runtime_error& ex){
578578
LOG_ERROR_S << "Error extracting dependecies from " << config_file;
579579
}
580580

0 commit comments

Comments
 (0)