+ if( prop )
+ {
+ // resolve worked, we will cache from now on, so clear _path and cache prop
+ _path = NULL;
+ _prop = prop;
+ }
+
+ return prop;
+}
+
+SGPropertyNode* PropertyObjectBase::getOrThrow() const
+{
+ SGPropertyNode* n = node(false);
+ if (!n) {
+ std::string path;
+ if (_prop) {
+ path = _prop->getPath();
+ if (_path) {
+ path += '/';
+ }
+ }
+
+ if (_path) {
+ path += _path;
+ }
+
+ throw sg_exception("Unknown property:" + path);
+ }
+
+ return n;