Summary Import : Limit size of error message to be displayed

This commit is contained in:
Magne Sjaastad
2019-06-07 15:54:07 +02:00
parent 92f2e085b0
commit 6fae8f9c94

View File

@@ -497,14 +497,16 @@ bool RimSummaryCaseCollection::validateEnsembleCases(const std::vector<RimSummar
if (!errors.isEmpty()) if (!errors.isEmpty())
{ {
errors.prepend("Missing ensemble parameters\n\n"); QString textToDisplay = errors.left(500);
errors.append("\n"); textToDisplay.prepend("Missing ensemble parameters\n\n");
errors.append("No parameters file (parameters.txt or runspecification.xml) was found in \n");
errors.append("the searched folders. ResInsight searches the home folder of the summary \n");
errors.append("case file and the three folder levels above that.\n");
throw errors; textToDisplay.append("\n");
textToDisplay.append("No parameters file (parameters.txt or runspecification.xml) was found in \n");
textToDisplay.append("the searched folders. ResInsight searches the home folder of the summary \n");
textToDisplay.append("case file and the three folder levels above that.\n");
throw textToDisplay;
} }
return true; return true;
} }