mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5757 Python : Report error message if no result is created
This commit is contained in:
parent
f076749dab
commit
1849c9cc76
@ -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" );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user