From 474b6610fa25055e07f1e970c1fc8a589b686f76 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 12 Sep 2023 09:53:13 +0200 Subject: [PATCH] lib/dbus/Error: add method GetName() --- src/lib/dbus/Error.hxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/dbus/Error.hxx b/src/lib/dbus/Error.hxx index 87824dbc1..973b70d6e 100644 --- a/src/lib/dbus/Error.hxx +++ b/src/lib/dbus/Error.hxx @@ -2,8 +2,7 @@ // Copyright CM4all GmbH // author: Max Kellermann -#ifndef ODBUS_ERROR_HXX -#define ODBUS_ERROR_HXX +#pragma once #include @@ -37,6 +36,10 @@ public: return &error; } + const char *GetName() const noexcept { + return error.name; + } + const char *GetMessage() const noexcept { return error.message; } @@ -47,5 +50,3 @@ public: }; } /* namespace ODBus */ - -#endif