Salome HOME
Issue #903 - Parameter is not created, if expression contains not created parameter
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetExprEditor.cpp
index b8e8ca60e4872d29582e0b222d4bb4d61bbb5c51..3b3d25c0815a8b9c8c2fdf2086de0da80dcd6a34 100644 (file)
@@ -227,7 +227,7 @@ bool ModuleBase_WidgetExprEditor::storeValueCustom() const
 
   // Try to get the value
   QString aStateMsg;
-  std::string anErrorMessage = myFeature->error();
+  std::string anErrorMessage = myFeature->string("ExpressionError")->value();
   if (anErrorMessage.empty()) {
     ResultParameterPtr aParam =
       std::dynamic_pointer_cast<ModelAPI_ResultParameter>(myFeature->firstResult());
@@ -240,7 +240,7 @@ bool ModuleBase_WidgetExprEditor::storeValueCustom() const
       }
     }
   } else {
-    aStateMsg = QString::fromStdString(anErrorMessage);
+    aStateMsg = "Error: " + QString::fromStdString(anErrorMessage);
   }
   myResultLabel->setText(aStateMsg);
   return true;