mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user