#2794 Summary Case Import: Improve error reporting.

* When an error is found with one summary case file, continue importing all the files that worked.
* Report an error in the log window and a message box afterwards about the case that failed.
* Fix crash when loading .EGRID file without a summary case.
This commit is contained in:
Gaute Lindkvist
2018-04-24 14:12:02 +02:00
parent b6aa35bf11
commit f456911c80
8 changed files with 214 additions and 111 deletions

View File

@@ -147,18 +147,6 @@ std::vector<RifRestartFileInfo> RifReaderEclipseSummary::getRestartFiles(const Q
currFile.fileName = headerFileName;
while(!currFile.fileName.isEmpty())
{
QString prevFile = currFile.fileName;
currFile = getRestartFile(currFile.fileName);
// Fix to stop potential infinite loop
if (currFile.fileName == prevFile)
{
m_warnings.push_back("RifReaderEclipseSummary: Restart file reference loop detected");
*hasWarnings = true;
break;
}
// Due to a weakness in libecl regarding restart summary header file selection,
// do some extra checking
{
@@ -187,6 +175,17 @@ std::vector<RifRestartFileInfo> RifReaderEclipseSummary::getRestartFiles(const Q
break;
}
}
QString prevFile = currFile.fileName;
currFile = getRestartFile(currFile.fileName);
// Fix to stop potential infinite loop
if (currFile.fileName == prevFile)
{
m_warnings.push_back("RifReaderEclipseSummary: Restart file reference loop detected");
*hasWarnings = true;
break;
}
}
if (!currFile.fileName.isEmpty())