mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4429 Implement return status handling for command file interface
This commit is contained in:
@@ -37,11 +37,14 @@ RicfLoadCase::RicfLoadCase()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfLoadCase::execute()
|
||||
RicfCommandResponse RicfLoadCase::execute()
|
||||
{
|
||||
bool ok = RiaImportEclipseCaseTools::openEclipseCasesFromFile(QStringList({m_path()}), nullptr, true);
|
||||
if (!ok)
|
||||
{
|
||||
RiaLogging::error(QString("loadCase: Unable to load case from %1").arg(m_path()));
|
||||
QString error = QString("loadCase: Unable to load case from %1").arg(m_path());
|
||||
RiaLogging::error(error);
|
||||
return RicfCommandResponse(RicfCommandResponse::COMMAND_ERROR, error);
|
||||
}
|
||||
return RicfCommandResponse();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user