]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make error messages shorter
authorspo <sergey.pokhodenko@opencascade.com>
Fri, 4 Sep 2015 09:45:29 +0000 (12:45 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 4 Sep 2015 11:17:24 +0000 (14:17 +0300)
src/Model/Model_Validator.cpp
src/XGUI/XGUI_ErrorMgr.cpp

index 4f2041c36bfd7d70837317c2d39b2a492a99f975..1fc4f71234db3b7e0b1a4d8188575f6c9f0503c6 100644 (file)
@@ -179,7 +179,7 @@ bool Model_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Feature>&
         if (!aFValidator->isValid(theFeature, anArguments, anError)) {
           if (anError.empty())
             anError = "Unknown error.";
-          anError = "Feature invalidated by \"" + aValidatorID + "\" with error: " + anError;
+          anError = aValidatorID + ": " + anError;
           theFeature->setError(anError, false);
           theFeature->data()->execState(ModelAPI_StateInvalidArgument);
           return false;
@@ -223,7 +223,7 @@ bool Model_ValidatorsFactory::validate(const std::shared_ptr<ModelAPI_Feature>&
     if (!validate(anAttribute, aValidatorID, anError)) {
       if (anError.empty())
         anError = "Unknown error.";
-      anError = "Attribute \"" + anAttributeID + "\" invalidated by \"" + aValidatorID + "\" with error: " + anError;
+      anError = anAttributeID + " - " + aValidatorID + ": " + anError;
       theFeature->setError(anError, false);
       theFeature->data()->execState(ModelAPI_StateInvalidArgument);
       return false;
index 7a7a86c202872fd938a8d5554ea793b1f7ed7167..cd4c50aa60806adab1c569c0ccc626220b06f9c6 100644 (file)
@@ -92,7 +92,7 @@ void XGUI_ErrorMgr::onWidgetChanged()
   if (!aValidators->validate(anAttribute, aValidatorID, anErrorMsg)) {
     if (anErrorMsg.empty())
       anErrorMsg = "unknown error.";
-    anErrorMsg = "Attribute \"" + anAttributeID + "\" invalidated by \"" + aValidatorID + "\" with error: " + anErrorMsg;
+    anErrorMsg = anAttributeID + " - " + aValidatorID + ": " + anErrorMsg;
   }
 
   QString anError = QString::fromStdString(anErrorMsg);