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:
@@ -40,7 +40,7 @@ RicfOpenProject::RicfOpenProject()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfOpenProject::execute()
|
||||
RicfCommandResponse RicfOpenProject::execute()
|
||||
{
|
||||
QString projectPath = m_path;
|
||||
QFileInfo projectPathInfo(projectPath);
|
||||
@@ -52,8 +52,9 @@ void RicfOpenProject::execute()
|
||||
bool ok = RiaApplication::instance()->loadProject(projectPath);
|
||||
if (!ok)
|
||||
{
|
||||
RiaLogging::error(QString("openProject: Unable to open project at %1").arg(m_path()));
|
||||
return;
|
||||
QString errMsg = QString("openProject: Unable to open project at %1").arg(m_path());
|
||||
RiaLogging::error(errMsg);
|
||||
return RicfCommandResponse(RicfCommandResponse::COMMAND_ERROR, errMsg);
|
||||
}
|
||||
|
||||
if (RiaRegressionTestRunner::instance()->isRunningRegressionTests())
|
||||
@@ -62,4 +63,6 @@ void RicfOpenProject::execute()
|
||||
}
|
||||
|
||||
RicfCommandFileExecutor::instance()->setLastProjectPath(projectPath);
|
||||
|
||||
return RicfCommandResponse();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user