Re: Reasoning behind sd_bus_error argument to sd_bus_call?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mi, 18.03.20 12:14, Daan De Meyer (daan.j.demeyer@xxxxxxxxx) wrote:

> I completely agree that for errors returned by the service, a D-Bus error
> is a lot better. However, from what I understand of sd-bus, any errors
> returned by the service are encoded in the reply returned by sd_bus_call
> and you use sd_bus_message_is_method_error and sd_bus_message_get_error on
> the reply to get the actual service error. Where does that leave the
> sd_bus_error argument of sd_bus_call?

We *either* return an error and fill in sd_bus_error (on error) *or*
we return a reply msg (on success). i.e. you won't get an
sd_bus_message object from sd_bus_call() at all on error, hence
nothing you could look into with sd_bus_message_get_error().

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux