| 27 | } |
| 28 | |
| 29 | TString 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 | |
| 46 | bool TUnstrictConfig::SetValue(const TString& path, const TString& value) { |
| 47 | try { |
nothing calls this directly
no test coverage detected