]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Model_Data sends an error if attribute doesn't exist
authorspo <sergey.pokhodenko@opencascade.com>
Tue, 24 May 2016 13:09:52 +0000 (16:09 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Tue, 24 May 2016 13:10:36 +0000 (16:10 +0300)
src/Model/Model_Data.cpp

index 1844bde4945007ae4590ea904692b9ad10d5e5a5..84548b6df3abea2a8593c918b52c563829dfbefe 100644 (file)
@@ -195,6 +195,8 @@ AttributePtr Model_Data::addAttribute(const std::string& theID, const std::strin
       myAttrs.find(theID); \
     if (aFound != myAttrs.end()) { \
       aRes = std::dynamic_pointer_cast<ATTR_TYPE>(aFound->second); \
+    } else { \
+      Events_Error::send("Can not receive unknown attribute " + theID + " of type " + #ATTR_TYPE); \
     } \
     return aRes; \
   }