MCPcopy Create free account
hub / github.com/catboost/catboost / GetValue

Method GetValue

library/cpp/yconf/patcher/unstrict_config.cpp:29–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29TString TUnstrictConfig::GetValue(const TString& path) const {
30 try {
31 TVector<TString> vPath = SplitString(path, ".");
32 TVector<TString>::const_iterator dir = vPath.end() - 1;
33 const TYandexConfig::Section* section = GetSection(GetRootSection(), vPath.begin(), dir);
34 if (!section)
35 return "__not_found__";
36 const Directives& directives = section->GetDirectives();
37 TString result;
38 if (!directives.GetValue(*dir, result))
39 return "__not_found__";
40 return result;
41 } catch (const yexception& e) {
42 ythrow yexception() << "Error while parse path " << path << ": " << e.what();
43 }
44}
45
46bool TUnstrictConfig::SetValue(const TString& path, const TString& value) {
47 try {

Callers

nothing calls this directly

Calls 4

SplitStringFunction · 0.50
endMethod · 0.45
beginMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected