mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5769 Well Disk : Show error messages in message window
This commit is contained in:
parent
1900caba50
commit
83bdf5f14d
@ -19,6 +19,7 @@
|
|||||||
#include "RimSimWellInViewTools.h"
|
#include "RimSimWellInViewTools.h"
|
||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
#include "RiaLogging.h"
|
||||||
#include "RiaSummaryTools.h"
|
#include "RiaSummaryTools.h"
|
||||||
#include "RiaTimeHistoryCurveResampler.h"
|
#include "RiaTimeHistoryCurveResampler.h"
|
||||||
|
|
||||||
@ -150,8 +151,9 @@ double RimSimWellInViewTools::extractValueForTimeStep( RifSummaryReaderInterface
|
|||||||
|
|
||||||
if ( !summaryReader->hasAddress( addr ) )
|
if ( !summaryReader->hasAddress( addr ) )
|
||||||
{
|
{
|
||||||
// TODO: better error handling
|
QString message = "ERROR: no address found for well " + wellName + " " + QString::fromStdString( vectorName );
|
||||||
std::cerr << "ERROR: no address found for well " << wellName.toStdString() << " " << vectorName << std::endl;
|
RiaLogging::warning( message );
|
||||||
|
|
||||||
*isOk = false;
|
*isOk = false;
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
@ -161,7 +163,9 @@ double RimSimWellInViewTools::extractValueForTimeStep( RifSummaryReaderInterface
|
|||||||
std::vector<time_t> timeSteps = summaryReader->timeSteps( addr );
|
std::vector<time_t> timeSteps = summaryReader->timeSteps( addr );
|
||||||
if ( values.empty() || timeSteps.empty() )
|
if ( values.empty() || timeSteps.empty() )
|
||||||
{
|
{
|
||||||
std::cerr << "Warning: no data found for well " << wellName.toStdString() << " " << vectorName << std::endl;
|
QString message = "ERROR: no data found for well " + wellName + " " + QString::fromStdString( vectorName );
|
||||||
|
RiaLogging::warning( message );
|
||||||
|
|
||||||
*isOk = false;
|
*isOk = false;
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
@ -190,7 +194,9 @@ double RimSimWellInViewTools::extractValueForTimeStep( RifSummaryReaderInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cerr << "ERROR: no resampled value found for well " << wellName.toStdString() << " " << vectorName << std::endl;
|
QString message = "ERROR: no resampled values found for well " + wellName + " " + QString::fromStdString( vectorName );
|
||||||
|
RiaLogging::warning( message );
|
||||||
|
|
||||||
*isOk = false;
|
*isOk = false;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user