# HG changeset patch # User chewie@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1282405443 0 # Node ID ea80b41c9bd772cd739683e9aecd1942f208362d # Parent 5df831617b42e9f7befd96ac328eda0c4235b5d4 - tested & applied patch by Helios - fixes API inconsistence and removed NotFound Exceptions for: - layer.getInstance() - model.getObjects() NOTE: - model.getObject() returned 0 if no objects were found, whereas model.getObjects() throws an exception (-> inconsistent) diff -r 5df831617b42 -r ea80b41c9bd7 engine/core/model/model.cpp --- a/engine/core/model/model.cpp Thu Aug 19 14:15:02 2010 +0000 +++ b/engine/core/model/model.cpp Sat Aug 21 15:44:03 2010 +0000 @@ -240,9 +240,9 @@ objectmap_t::const_iterator it = nspace->second.begin(); for(; it != nspace->second.end(); ++it ) object_list.push_back(it->second); - return object_list; } - throw NotFound(name_space); + + return object_list; } const Model::namespace_t* Model::selectNamespace(const std::string& name_space) const { diff -r 5df831617b42 -r ea80b41c9bd7 engine/core/model/structures/layer.cpp --- a/engine/core/model/structures/layer.cpp Thu Aug 19 14:15:02 2010 +0000 +++ b/engine/core/model/structures/layer.cpp Sat Aug 21 15:44:03 2010 +0000 @@ -148,7 +148,7 @@ return *it; } - throw NotFound(id); + return 0; } std::vector Layer::getInstances(const std::string& id) {