mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2573 Eclipse Text File Import : Improve error message if required keyword is missing
This commit is contained in:
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include "RifEclipseInputFileTools.h"
|
#include "RifEclipseInputFileTools.h"
|
||||||
|
|
||||||
|
#include "RiaLogging.h"
|
||||||
|
|
||||||
#include "RifReaderEclipseOutput.h"
|
#include "RifReaderEclipseOutput.h"
|
||||||
|
|
||||||
#include "RigActiveCellInfo.h"
|
#include "RigActiveCellInfo.h"
|
||||||
@@ -90,6 +92,25 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseC
|
|||||||
|
|
||||||
if (coordPos < 0 || zcornPos < 0 || specgridPos < 0)
|
if (coordPos < 0 || zcornPos < 0 || specgridPos < 0)
|
||||||
{
|
{
|
||||||
|
QString errorText = QString("Failed to import grid file '%1'\n").arg(fileName);
|
||||||
|
|
||||||
|
if (coordPos < 0)
|
||||||
|
{
|
||||||
|
errorText += " Missing required keyword COORD";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (zcornPos < 0)
|
||||||
|
{
|
||||||
|
errorText += " Missing required keyword ZCORN";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (specgridPos < 0)
|
||||||
|
{
|
||||||
|
errorText += " Missing required keyword SPECGRID";
|
||||||
|
}
|
||||||
|
|
||||||
|
RiaLogging::error(errorText);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user