mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 22:50:25 -05:00
OpmFlowDeck: avoid swallowing error messages when loading deck.
This commit is contained in:
1 parent
b0153081fc
commit
1f42f70d26
6 files changed
+35
-26
No files matched your search
@@ -572,11 +572,18 @@ bool RimOpmFlowJob::openDeckFile()
|
||||
bool deckLoadOk = false;
|
||||
try
|
||||
{
|
||||
deckLoadOk = m_deckFile->loadDeck( m_deckFileName().path().toStdString() );
|
||||
if ( deckLoadOk )
|
||||
auto loadResult = m_deckFile->loadDeck( m_deckFileName().path().toStdString() );
|
||||
if ( loadResult.has_value() )
|
||||
{
|
||||
m_fileDeckHasDates = m_deckFile->hasDatesKeyword();
|
||||
m_fileDeckIsRestart = m_deckFile->isRestartFile();
|
||||
deckLoadOk = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::error(
|
||||
QString( "Failed to open %1. Error: %2." ).arg( m_deckFileName().path() ).arg( QString::fromStdString( loadResult.error() ) ) );
|
||||
deckLoadOk = false;
|
||||
}
|
||||
}
|
||||
catch ( std::filesystem::filesystem_error& )
|
||||
|
||||
Reference in new issue
Block a user