mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Osdu wellpath import: improve error handling.
This commit is contained in:
parent
8854abe482
commit
c5da22223b
@ -677,7 +677,9 @@ void RiaOsduConnector::requestParquetData( const QString& url, const QString& da
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( "Download failed: " + url + " failed." + reply->errorString() );
|
||||
QString errorMessage = "Download failed: " + url + " failed." + reply->errorString();
|
||||
RiaLogging::error( errorMessage );
|
||||
emit parquetDownloadFinished( QByteArray(), errorMessage );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
@ -82,6 +82,10 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
std::vector<RiuWellImportWizard::WellInfo> importedWells = wellImportwizard.importedWells();
|
||||
for ( auto w : importedWells )
|
||||
{
|
||||
auto [wellPathGeometry, errorMessage] =
|
||||
RimWellPathCollection::loadWellPathGeometryFromOsdu( osduConnector, w.wellboreTrajectoryId );
|
||||
if ( wellPathGeometry.notNull() )
|
||||
{
|
||||
auto wellPath = new RimOsduWellPath;
|
||||
wellPath->setName( w.name );
|
||||
@ -91,10 +95,6 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
oilField->wellPathCollection->addWellPath( wellPath );
|
||||
|
||||
auto [wellPathGeometry, errorMessage] =
|
||||
RimWellPathCollection::loadWellPathGeometryFromOsdu( osduConnector, w.wellboreTrajectoryId );
|
||||
if ( wellPathGeometry.notNull() )
|
||||
{
|
||||
wellPath->setWellPathGeometry( wellPathGeometry.p() );
|
||||
}
|
||||
else
|
||||
|
@ -65,23 +65,22 @@ void RicImportWellLogOsduFeature::onActionTriggered( bool isChecked )
|
||||
std::vector<OsduWellLog> wellLogs = osduConnector->requestWellLogsByWellboreIdBlocking( wellPath->wellboreId() );
|
||||
|
||||
for ( OsduWellLog wellLog : wellLogs )
|
||||
{
|
||||
auto [wellLogData, errorMessage] = RimWellPathCollection::loadWellLogFromOsdu( osduConnector, wellLog.id );
|
||||
if ( wellLogData.notNull() )
|
||||
{
|
||||
RimOsduWellLog* osduWellLog = new RimOsduWellLog;
|
||||
osduWellLog->setName( wellLog.id );
|
||||
osduWellLog->setWellLogId( wellLog.id );
|
||||
oilField->wellPathCollection->addWellLog( osduWellLog, wellPath );
|
||||
|
||||
auto [wellLogData, errorMessage] = RimWellPathCollection::loadWellLogFromOsdu( osduConnector, osduWellLog->wellLogId() );
|
||||
if ( wellLogData.notNull() )
|
||||
{
|
||||
osduWellLog->setWellLogData( wellLogData.p() );
|
||||
osduWellLog->updateConnectedEditors();
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error( "Importing OSDU well log failed: " + errorMessage );
|
||||
}
|
||||
|
||||
osduWellLog->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user