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
{
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

@ -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

View File

@ -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();
}
}
}