utils: codegen: ipc: Log error code when remote call fails

The error code can be useful in diagnosing the underlying issue,
so log that as well, not just the existence of the issue.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
Barnabás Pőcze 2025-05-13 14:31:06 +02:00
parent d58ccabab7
commit 4adefc100d

View file

@ -206,7 +206,7 @@ void {{proxy_name}}::recvMessage(const IPCMessage &data)
);
{%- endif %}
if (_ret < 0) {
LOG(IPAProxy, Error) << "Failed to call {{method.mojom_name}}";
LOG(IPAProxy, Error) << "Failed to call {{method.mojom_name}}: " << _ret;
{%- if method|method_return_value != "void" %}
return static_cast<{{method|method_return_value}}>(_ret);
{%- else %}