Modified set_handler() to return dbus error code
Modified set_handler() to return dbus error code

set_handler() will call the registered callback
if set command is given to a dbus property. The
callback can return error code but the existing
code were not handling it properly.

The following patch replaced sdbusplus exception
with a negative error code in dbus-senors

https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/46444

The error code must be used to set the dbus error.
This was handled properly in case of an exception
but not if the callback was returning error code

Signed-off-by: Gokul Sanker V.G <7dc1db55cc36b15f74f1c9b30b70e444f33c3e6c@intel.com>
Change-Id: Id164a9b3e62e65ec607d27d2219a3847d2cc7aab

openbmc/sdbusplus,openbmc/sdbusplus,openbmc/sdbusplus,openbmc/sdbusplus