Salome HOME
Replace error construction with + with using %1 placeholders
[modules/shaper.git] / src / GeomValidators / GeomValidators_BodyShapes.cpp
index 18bd9918a59949e9634eda8708923eb10f27695a..504daa4afda22792eb6f04cd8881092d173e6621 100644 (file)
@@ -6,13 +6,15 @@
 
 #include "GeomValidators_BodyShapes.h"
 
+#include <Events_InfoMessage.h>
+
 #include <ModelAPI_AttributeSelectionList.h>
 #include <ModelAPI_Object.h>
 #include <ModelAPI_ResultConstruction.h>
 
 bool GeomValidators_BodyShapes::isValid(const AttributePtr& theAttribute,
                                         const std::list<std::string>& theArguments,
-                                        std::string& theError) const
+                                        Events_InfoMessage& theError) const
 {
   std::string anAttributeType = theAttribute->attributeType();
   if(anAttributeType == ModelAPI_AttributeSelection::typeId()) {
@@ -41,7 +43,8 @@ bool GeomValidators_BodyShapes::isValid(const AttributePtr& theAttribute,
       }
     }
   } else {
-    theError = "Error: Attribute \"" + anAttributeType + "\" does not supported by this validator.";
+    theError = "Error: Attribute \"%1\" does not supported by this validator.";
+    theError.arg(anAttributeType);
     return false;
   }