lib/dbus/Error: add method GetName()

This commit is contained in:
Max Kellermann 2023-09-12 09:53:13 +02:00
parent 11c49da871
commit 474b6610fa
1 changed files with 5 additions and 4 deletions

View File

@ -2,8 +2,7 @@
// Copyright CM4all GmbH // Copyright CM4all GmbH
// author: Max Kellermann <mk@cm4all.com> // author: Max Kellermann <mk@cm4all.com>
#ifndef ODBUS_ERROR_HXX #pragma once
#define ODBUS_ERROR_HXX
#include <dbus/dbus.h> #include <dbus/dbus.h>
@ -37,6 +36,10 @@ public:
return &error; return &error;
} }
const char *GetName() const noexcept {
return error.name;
}
const char *GetMessage() const noexcept { const char *GetMessage() const noexcept {
return error.message; return error.message;
} }
@ -47,5 +50,3 @@ public:
}; };
} /* namespace ODBus */ } /* namespace ODBus */
#endif