From 2ca55faf237e66fdbb38b110fcd7308020bf5a9d Mon Sep 17 00:00:00 2001 From: spo Date: Fri, 4 Sep 2015 12:45:29 +0300 Subject: [PATCH] Make error messages shorter --- src/Model/Model_Validator.cpp | 4 ++-- src/XGUI/XGUI_ErrorMgr.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.2