#4429 Implement return status handling for command file interface

This commit is contained in:
Gaute Lindkvist
2019-05-23 13:59:19 +02:00
parent e29c7acc03
commit 650af20e06
61 changed files with 639 additions and 276 deletions

View File

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