|
|
@ -64,7 +64,9 @@ bool create_params_path(const std::string ¶m_path, const std::string &key_pa |
|
|
|
std::string ensure_params_path(const std::string &prefix, const std::string &path = {}) { |
|
|
|
std::string ensure_params_path(const std::string &prefix, const std::string &path = {}) { |
|
|
|
std::string params_path = path.empty() ? Path::params() : path; |
|
|
|
std::string params_path = path.empty() ? Path::params() : path; |
|
|
|
if (!create_params_path(params_path, params_path + prefix)) { |
|
|
|
if (!create_params_path(params_path, params_path + prefix)) { |
|
|
|
throw std::runtime_error(util::string_format("Failed to ensure params path, errno=%d, path=%s", errno, params_path.c_str())); |
|
|
|
throw std::runtime_error(util::string_format( |
|
|
|
|
|
|
|
"Failed to ensure params path, errno=%d, path=%s, param_prefix=%s", |
|
|
|
|
|
|
|
errno, params_path.c_str(), prefix.c_str())); |
|
|
|
} |
|
|
|
} |
|
|
|
return params_path; |
|
|
|
return params_path; |
|
|
|
} |
|
|
|
} |
|
|
|