mirror of https://github.com/qt/qtgrpc.git
Add gRPC warning for the unsuccessful deserialization attempt
Align the deserialization error handling with the serialization. Pick-to: 6.8 Change-Id: I5901f8191232b532bbc0b6f1b80f858e88711065 Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
This commit is contained in:
parent
119add5fde
commit
e1a9d0dbee
|
|
@ -114,7 +114,12 @@ bool QGrpcOperation::read(QProtobufMessage *message) const
|
|||
Q_D(const QGrpcOperation);
|
||||
const auto ser = d->operationContext->serializer();
|
||||
Q_ASSERT_X(ser, "QGrpcOperation", "The serializer is null");
|
||||
return ser->deserialize(message, d->data);
|
||||
if (!ser->deserialize(message, d->data)) {
|
||||
qGrpcWarning() << "Unable to deserialize message("<< ser->lastError() <<"): "
|
||||
<< ser->lastErrorString();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Reference in New Issue