Salome HOME
Roll back the modification, not yet approved
[modules/shaper.git] / src / ParametersPlugin / ParametersPlugin_Validators.cpp
index d0b00ca8e8bff0494247b5cd4af0956a2c650333..82bd9d8d4d4d97304f65b4408f86bf19602cd1cd 100644 (file)
@@ -7,6 +7,8 @@
 
 #include <ParametersPlugin_Validators.h>
 
+#include <ParametersPlugin_Parameter.h>
+
 #include <ModelAPI_AttributeString.h>
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_ResultParameter.h>
@@ -93,16 +95,16 @@ bool ParametersPlugin_ExpressionValidator::isValid(const AttributePtr& theAttrib
   AttributeStringPtr aStrAttr =
       std::dynamic_pointer_cast<ModelAPI_AttributeString>(theAttribute);
   bool isEmptyExpr = aStrAttr->value().empty();
-  if(isEmptyExpr) {
+  if (isEmptyExpr) {
     theError = "Expression is empty.";
     return false;
   }
 
-  if(!aParam.get()) {
+  if (!aParam.get()) {
     theError = "Result is empty.";
     return false;
   }
 
-  theError = aFeature->error();
-  return aFeature->error().empty();
+  theError = aFeature->string(ParametersPlugin_Parameter::EXPRESSION_ERROR_ID())->value();
+  return theError.empty();
 }