mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
#4429 Implement return status handling for command file interface
This commit is contained in:
1 parent
e29c7acc03
commit
650af20e06
61 files changed
+639
-276
No files matched your search
@@ -73,8 +73,15 @@ grpc::Status RiaGrpcCommandService::Execute(grpc::ServerContext* context, const
|
||||
}
|
||||
}
|
||||
}
|
||||
commandHandle->execute();
|
||||
|
||||
RicfCommandResponse response = commandHandle->execute();
|
||||
if (response.status() == RicfCommandResponse::COMMAND_ERROR)
|
||||
{
|
||||
return grpc::Status(grpc::FAILED_PRECONDITION, response.message().toStdString());
|
||||
}
|
||||
else if (response.status() == RicfCommandResponse::COMMAND_WARNING)
|
||||
{
|
||||
context->AddInitialMetadata("warning", response.message().toStdString());
|
||||
}
|
||||
return Status::OK;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user