exception: add errno
sdbusplus is going to start requiring the get_errno[1,2] function on
all exceptions. Since the exception defined here is using the same
dbus error as one already in sd_bus, set the errno here to match:
src/libsystemd/sd-bus/bus-error.c:
SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.Failed", EACCES),
1. https://github.com/openbmc/sdbusplus/commit/b6f729d68d9edcd43fa236eee386b193a95588e7
2. https://gerrit.openbmc-project.xyz/c/openbmc/sdbusplus/+/46718
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I132fa29dfd10bbdcaab1895e2287c2ac89096270
diff --git a/include/Utils.hpp b/include/Utils.hpp
index 0aff148..7b50036 100644
--- a/include/Utils.hpp
+++ b/include/Utils.hpp
@@ -77,16 +77,21 @@
const char* name() const noexcept override
{
return "org.freedesktop.DBus.Error.Failed";
- };
+ }
const char* description() const noexcept override
{
return "internal error";
- };
+ }
const char* what() const noexcept override
{
return "org.freedesktop.DBus.Error.Failed: "
"internal error";
- };
+ }
+
+ int get_errno() const noexcept override
+ {
+ return EACCES;
+ }
};
inline bool fwVersionIsSame(void)