mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
#5757 Python : Report error message if no result is created
This commit is contained in:
1 parent
f076749dab
commit
1849c9cc76
1 file changed
+11
-4
@@ -527,12 +527,19 @@ grpc::Status RiaGrpcPdmObjectService::CallPdmObjectMethod( grpc::ServerContext*
|
||||
copyPdmObjectFromRipsToCaf( &( request->params() ), method.get() );
|
||||
|
||||
caf::PdmObjectHandle* result = method->execute();
|
||||
copyPdmObjectFromCafToRips( result, reply );
|
||||
if ( !method->resultIsPersistent() )
|
||||
if ( result )
|
||||
{
|
||||
delete result;
|
||||
copyPdmObjectFromCafToRips( result, reply );
|
||||
if ( !method->resultIsPersistent() )
|
||||
{
|
||||
delete result;
|
||||
}
|
||||
return grpc::Status::OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
return grpc::Status( grpc::NOT_FOUND, "No result returned from Method" );
|
||||
}
|
||||
return grpc::Status::OK;
|
||||
}
|
||||
return grpc::Status( grpc::NOT_FOUND, "Could not find Method" );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user