Error handling

chandu chanti chandutmba at gmail.com
Thu Jul 20 17:04:36 AEST 2023


Hi Team,

We are planning to handle errors from backend services in bmc web. We are
considering the following approaches to implement it, but we are facing
some issues. please provide your inputs.

1 . Using exceptions in our backend D-Bus service by throwing exceptions in
the D-Bus property get handlers. It works fine for the Get property method
call. However, when using the Get All method call, if one property fails,
an error is returned without checking the other properties. Is there a way
to implement exceptions in GetAll so that even if one property fails, we
can still fetch the remaining properties.

2. Using default values in D-Bus properties to indicate errors. Is there a
reference implementation available for setting default values for string
and integer data types in bmc web, similar to the implementation of NaN
(default value) for the double data type in cable.hpp.

3. Implement associated return code per property on dbus, but this would be
very inefficient in terms of double the properties on dbus, something we
would like to avoid

Thanks
Chandrasekhar T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20230720/66ffc406/attachment.htm>


More information about the openbmc mailing list