catch non-existent nodes, too
This commit is contained in:
parent
9c98766700
commit
91a367379c
1 changed files with 8 additions and 9 deletions
|
@ -295,15 +295,14 @@ void PropertyList::valueChanged(SGPropertyNode *nd)
|
|||
|
||||
|
||||
void PropertyList::setValue(const char *s)
|
||||
{
|
||||
SGPropertyNode *p;
|
||||
try {
|
||||
p = fgGetNode(s, false);
|
||||
} catch (const stdString& m) {
|
||||
SG_LOG(SG_GENERAL, SG_DEBUG, "property-list: " << m);
|
||||
return;
|
||||
}
|
||||
setCurrent(p);
|
||||
try {
|
||||
SGPropertyNode *p = fgGetNode(s, false);
|
||||
if (p)
|
||||
setCurrent(p);
|
||||
else
|
||||
throw stdString("node doesn't exist");
|
||||
} catch (const stdString& m) {
|
||||
SG_LOG(SG_GENERAL, SG_DEBUG, "property-list node `" << s << "': "<< m);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue