diff options
author | Lutz Bichler <Lutz.Bichler@bmw.de> | 2020-10-27 10:00:57 +0100 |
---|---|---|
committer | Lutz Bichler <Lutz.Bichler@bmw.de> | 2020-10-27 10:00:57 +0100 |
commit | d1610ad0d6f1b6751964af41a0cc1599e2d7a955 (patch) | |
tree | 2144ae231a4ca372f497605d5b4779d2e11c2888 /include/CommonAPI/DBus/DBusErrorEvent.hpp | |
parent | 9f85f0f18d9ca436fb618769149ee02e78fd283b (diff) | |
download | genivi-common-api-dbus-runtime-master.tar.gz |
Diffstat (limited to 'include/CommonAPI/DBus/DBusErrorEvent.hpp')
-rw-r--r-- | include/CommonAPI/DBus/DBusErrorEvent.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/CommonAPI/DBus/DBusErrorEvent.hpp b/include/CommonAPI/DBus/DBusErrorEvent.hpp index 966f9e1..0ab53aa 100644 --- a/include/CommonAPI/DBus/DBusErrorEvent.hpp +++ b/include/CommonAPI/DBus/DBusErrorEvent.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2013-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +// Copyright (C) 2013-2020 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. @@ -73,19 +73,21 @@ public: private: - template <int... DeplIn_ArgIndices> + template <size_t... DeplIn_ArgIndices> inline void initialize(index_sequence<DeplIn_ArgIndices...>, const std::tuple<DeplIn_Args*...> &_in) { in_ = std::make_tuple(std::get<DeplIn_ArgIndices>(_in)...); } - template <int... InArgIndices_> + template <size_t... InArgIndices_> void deserialize(const DBusMessage &_reply, index_sequence<InArgIndices_...>) { if (sizeof...(InArgs_) > 0) { DBusInputStream dbusInputStream(_reply); const bool success = DBusSerializableArguments<CommonAPI::Deployable<InArgs_, DeplIn_Args>...>::deserialize(dbusInputStream, std::get<InArgIndices_>(in_)...); - if (!success) + if (!success) { + COMMONAPI_ERROR("DBusErrorEvent::", __func__, "(", errorName_, "): deserialization failed!"); return; + } this->notifyListeners(errorName_, std::move(std::get<InArgIndices_>(in_).getValue())...); } } @@ -96,7 +98,7 @@ private: class DBusErrorEventHelper { public: - template <int... ErrorEventsIndices_, class... ErrorEvents_> + template <size_t... ErrorEventsIndices_, class... ErrorEvents_> static void notifyListeners(const DBusMessage &_reply, const std::string &_errorName, index_sequence<ErrorEventsIndices_...>, |