mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Move PropertyNotFound handling to ProgOptions
This commit is contained in:
committed by
Dennis Klein
parent
48e04b636b
commit
26fe5e2bd8
@@ -197,6 +197,17 @@ string ProgOptions::GetPropertyAsString(const string& key) const
|
||||
{
|
||||
lock_guard<mutex> lock(fMtx);
|
||||
|
||||
if (fVarMap.count(key)) {
|
||||
return ConvertVarValToString(fVarMap.at(key));
|
||||
} else {
|
||||
throw PropertyNotFoundError(fair::mq::tools::ToString("Config has no key: ", key));
|
||||
}
|
||||
}
|
||||
|
||||
string ProgOptions::GetStringValue(const string& key) const
|
||||
{
|
||||
lock_guard<mutex> lock(fMtx);
|
||||
|
||||
if (fVarMap.count(key)) {
|
||||
return ConvertVarValToString(fVarMap.at(key));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user