mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4893 Import Observed FMU data : Add error message
This commit is contained in:
@@ -112,7 +112,7 @@ bool RifReaderFmuRft::directoryContainsFmuRftData( const QString& filePath )
|
||||
}
|
||||
|
||||
QDir dir( filePath );
|
||||
if ( !dir.exists( "well_date_rft.txt" ) )
|
||||
if ( !dir.exists( RifReaderFmuRft::wellPathFileName() ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -138,6 +138,14 @@ bool RifReaderFmuRft::directoryContainsFmuRftData( const QString& filePath )
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RifReaderFmuRft::wellPathFileName()
|
||||
{
|
||||
return "well_date_rft.txt";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -386,10 +394,10 @@ RifReaderFmuRft::WellObservationMap RifReaderFmuRft::loadWellDates( QDir& dir, Q
|
||||
|
||||
WellObservationMap validObservations;
|
||||
|
||||
QFileInfo wellDateFileInfo( dir.absoluteFilePath( "well_date_rft.txt" ) );
|
||||
QFileInfo wellDateFileInfo( dir.absoluteFilePath( RifReaderFmuRft::wellPathFileName() ) );
|
||||
if ( !( wellDateFileInfo.exists() && wellDateFileInfo.isFile() && wellDateFileInfo.isReadable() ) )
|
||||
{
|
||||
*errorMsg = QString( "well_date_rft.txt cannot be found at '%s'" ).arg( m_filePath );
|
||||
*errorMsg = QString( "%1 cannot be found at '%s'" ).arg( RifReaderFmuRft::wellPathFileName() ).arg( m_filePath );
|
||||
return WellObservationMap();
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ public:
|
||||
|
||||
static QStringList findSubDirectoriesWithFmuRftData( const QString& filePath );
|
||||
static bool directoryContainsFmuRftData( const QString& filePath );
|
||||
static QString wellPathFileName();
|
||||
|
||||
std::vector<QString> labels( const RifEclipseRftAddress& rftAddress );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user