From 91a367379c1c099cc712ac9e76d4284e37e6ef2d Mon Sep 17 00:00:00 2001 From: mfranz Date: Tue, 23 May 2006 20:48:01 +0000 Subject: [PATCH] catch non-existent nodes, too --- src/GUI/property_list.cxx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/GUI/property_list.cxx b/src/GUI/property_list.cxx index 28dc91973..f8eda89fa 100644 --- a/src/GUI/property_list.cxx +++ b/src/GUI/property_list.cxx @@ -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); } -- 2.39.5