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)
|
void PropertyList::setValue(const char *s)
|
||||||
{
|
try {
|
||||||
SGPropertyNode *p;
|
SGPropertyNode *p = fgGetNode(s, false);
|
||||||
try {
|
if (p)
|
||||||
p = fgGetNode(s, false);
|
setCurrent(p);
|
||||||
} catch (const stdString& m) {
|
else
|
||||||
SG_LOG(SG_GENERAL, SG_DEBUG, "property-list: " << m);
|
throw stdString("node doesn't exist");
|
||||||
return;
|
} catch (const stdString& m) {
|
||||||
}
|
SG_LOG(SG_GENERAL, SG_DEBUG, "property-list node `" << s << "': "<< m);
|
||||||
setCurrent(p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue