Osdu wellpath import: improve error handling.

This commit is contained in:
Kristian Bendiksen 2024-06-10 13:23:13 +02:00
parent 8854abe482
commit c5da22223b
3 changed files with 18 additions and 17 deletions

View File

@ -677,7 +677,9 @@ void RiaOsduConnector::requestParquetData( const QString& url, const QString& da
} }
else else
{ {
RiaLogging::error( "Download failed: " + url + " failed." + reply->errorString() ); QString errorMessage = "Download failed: " + url + " failed." + reply->errorString();
RiaLogging::error( errorMessage );
emit parquetDownloadFinished( QByteArray(), errorMessage );
} }
} ); } );
} }

View File

@ -83,18 +83,18 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
std::vector<RiuWellImportWizard::WellInfo> importedWells = wellImportwizard.importedWells(); std::vector<RiuWellImportWizard::WellInfo> importedWells = wellImportwizard.importedWells();
for ( auto w : importedWells ) for ( auto w : importedWells )
{ {
auto wellPath = new RimOsduWellPath;
wellPath->setName( w.name );
wellPath->setWellId( w.wellId );
wellPath->setWellboreId( w.wellboreId );
wellPath->setWellboreTrajectoryId( w.wellboreTrajectoryId );
oilField->wellPathCollection->addWellPath( wellPath );
auto [wellPathGeometry, errorMessage] = auto [wellPathGeometry, errorMessage] =
RimWellPathCollection::loadWellPathGeometryFromOsdu( osduConnector, w.wellboreTrajectoryId ); RimWellPathCollection::loadWellPathGeometryFromOsdu( osduConnector, w.wellboreTrajectoryId );
if ( wellPathGeometry.notNull() ) if ( wellPathGeometry.notNull() )
{ {
auto wellPath = new RimOsduWellPath;
wellPath->setName( w.name );
wellPath->setWellId( w.wellId );
wellPath->setWellboreId( w.wellboreId );
wellPath->setWellboreTrajectoryId( w.wellboreTrajectoryId );
oilField->wellPathCollection->addWellPath( wellPath );
wellPath->setWellPathGeometry( wellPathGeometry.p() ); wellPath->setWellPathGeometry( wellPathGeometry.p() );
} }
else else

View File

@ -66,22 +66,21 @@ void RicImportWellLogOsduFeature::onActionTriggered( bool isChecked )
for ( OsduWellLog wellLog : wellLogs ) for ( OsduWellLog wellLog : wellLogs )
{ {
RimOsduWellLog* osduWellLog = new RimOsduWellLog; auto [wellLogData, errorMessage] = RimWellPathCollection::loadWellLogFromOsdu( osduConnector, wellLog.id );
osduWellLog->setName( wellLog.id );
osduWellLog->setWellLogId( wellLog.id );
oilField->wellPathCollection->addWellLog( osduWellLog, wellPath );
auto [wellLogData, errorMessage] = RimWellPathCollection::loadWellLogFromOsdu( osduConnector, osduWellLog->wellLogId() );
if ( wellLogData.notNull() ) if ( wellLogData.notNull() )
{ {
RimOsduWellLog* osduWellLog = new RimOsduWellLog;
osduWellLog->setName( wellLog.id );
osduWellLog->setWellLogId( wellLog.id );
oilField->wellPathCollection->addWellLog( osduWellLog, wellPath );
osduWellLog->setWellLogData( wellLogData.p() ); osduWellLog->setWellLogData( wellLogData.p() );
osduWellLog->updateConnectedEditors();
} }
else else
{ {
RiaLogging::error( "Importing OSDU well log failed: " + errorMessage ); RiaLogging::error( "Importing OSDU well log failed: " + errorMessage );
} }
osduWellLog->updateConnectedEditors();
} }
} }
} }