mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
Manage NotFoundException for different configuration shema.
Signed-off-by: zosrothko <zosrothko@orange.fr>
This commit is contained in:
parent
b45b4b8899
commit
83bd74e881
@ -227,10 +227,21 @@ protected:
|
||||
else
|
||||
platformComp += ".unix";
|
||||
|
||||
std::string exec = config().getString(platformComp + ".exec", config().getString(comp + ".exec"));
|
||||
std::string opts = config().getString(platformComp + ".options", config().getString(comp + ".options"));
|
||||
std::string path = config().getString(platformComp + ".path", config().getString(comp + ".path", ""));
|
||||
bool usePipe = config().getBool(platformComp + ".usePipe", config().getBool(comp + ".usePipe", false));
|
||||
std::string exec;
|
||||
std::string opts;
|
||||
std::string path;
|
||||
bool usePipe;
|
||||
try {
|
||||
exec = config().getString(comp + ".exec");
|
||||
opts = config().getString(comp + ".options");
|
||||
path = config().getString(comp + ".path", "");
|
||||
usePipe = config().getBool(comp + ".usePipe", false);
|
||||
} catch (Poco::NotFoundException&) {
|
||||
exec = config().getString(platformComp + ".exec");
|
||||
opts = config().getString(platformComp + ".options");
|
||||
path = config().getString(platformComp + ".path", "");
|
||||
usePipe = config().getBool(platformComp + ".usePipe", false);
|
||||
}
|
||||
|
||||
std::string popts;
|
||||
for (std::string::const_iterator it = opts.begin(); it != opts.end(); ++it)
|
||||
|
Loading…
Reference in New Issue
Block a user