From: spo Date: Fri, 4 Sep 2015 09:45:29 +0000 (+0300) Subject: Make error messages shorter X-Git-Tag: V_1.4.0_beta4~123 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2ca55faf237e66fdbb38b110fcd7308020bf5a9d;p=modules%2Fshaper.git Make error messages shorter --- diff --git a/src/Model/Model_Validator.cpp b/src/Model/Model_Validator.cpp index 4f2041c36..1fc4f7123 100644 --- a/src/Model/Model_Validator.cpp +++ b/src/Model/Model_Validator.cpp @@ -179,7 +179,7 @@ bool Model_ValidatorsFactory::validate(const std::shared_ptr& 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& 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; diff --git a/src/XGUI/XGUI_ErrorMgr.cpp b/src/XGUI/XGUI_ErrorMgr.cpp index 7a7a86c20..cd4c50aa6 100644 --- a/src/XGUI/XGUI_ErrorMgr.cpp +++ b/src/XGUI/XGUI_ErrorMgr.cpp @@ -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);