[RFC PATCH v1 4/8] utils: codegen: ipc: Log error code when remote call fails

Jacopo Mondi jacopo.mondi at ideasonboard.com
Tue May 20 13:48:46 CEST 2025


Hi Barnabás

On Thu, May 15, 2025 at 02:00:08PM +0200, Barnabás Pőcze wrote:
> 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 at ideasonboard.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>

> ---
>  .../generators/libcamera_templates/module_ipa_proxy.cpp.tmpl    | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> index 07165821e..effc8f7dd 100644
> --- a/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> +++ b/utils/codegen/ipc/generators/libcamera_templates/module_ipa_proxy.cpp.tmpl
> @@ -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 %}
> --
> 2.49.0
>


More information about the libcamera-devel mailing list