mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Avoid throwing exception when opening a file for export
This commit is contained in:
@@ -883,15 +883,15 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
|
||||
if ( !completionsForMainGrid.empty() )
|
||||
{
|
||||
try
|
||||
{
|
||||
QFileInfo fi( fileName );
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
fi.baseName(),
|
||||
fi.suffix(),
|
||||
exportDataSourceAsComment );
|
||||
QFileInfo fi( fileName );
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
fi.baseName(),
|
||||
fi.suffix(),
|
||||
exportDataSourceAsComment );
|
||||
|
||||
if ( exportFile )
|
||||
{
|
||||
std::map<QString, std::vector<RigCompletionData>> completionsForGrid;
|
||||
completionsForGrid.insert( std::pair<QString, std::vector<RigCompletionData>>( "", completionsForMainGrid ) );
|
||||
|
||||
@@ -902,24 +902,21 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
}
|
||||
exportCompdatAndWpimultTables( eclipseCase, exportFile, completionsForGrid, exportType, exportDataSourceAsComment );
|
||||
}
|
||||
catch ( RicWellPathExportCompletionsFileTools::OpenFileException )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if ( !completionsForSubGrids.empty() )
|
||||
{
|
||||
try
|
||||
QFileInfo fi( fileName );
|
||||
|
||||
QString lgrFileName = fi.baseName() + "_LGR";
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
lgrFileName,
|
||||
fi.suffix(),
|
||||
exportDataSourceAsComment );
|
||||
|
||||
if ( exportFile )
|
||||
{
|
||||
QFileInfo fi( fileName );
|
||||
|
||||
QString lgrFileName = fi.baseName() + "_LGR";
|
||||
std::shared_ptr<QFile> exportFile =
|
||||
RicWellPathExportCompletionsFileTools::openFileForExport( folderName,
|
||||
lgrFileName,
|
||||
fi.suffix(),
|
||||
exportDataSourceAsComment );
|
||||
|
||||
exportWellPathFractureReport( eclipseCase, exportFile, wellPathFractureReportItems );
|
||||
if ( exportWelspec )
|
||||
{
|
||||
@@ -927,9 +924,6 @@ void RicWellPathExportCompletionDataFeatureImpl::sortAndExportCompletionsToFile(
|
||||
}
|
||||
exportCompdatAndWpimultTables( eclipseCase, exportFile, completionsForSubGrids, exportType, exportDataSourceAsComment );
|
||||
}
|
||||
catch ( RicWellPathExportCompletionsFileTools::OpenFileException )
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user