1 #pragma once
2 
3 #include "logging.hpp"
4 
5 #include <sdbusplus/unpack_properties.hpp>
6 
7 namespace redfish
8 {
9 namespace dbus_utils
10 {
11 
12 struct UnpackErrorPrinter
13 {
14     void operator()(const sdbusplus::UnpackErrorReason reason,
15                     const std::string& property) const noexcept
16     {
17         BMCWEB_LOG_ERROR(
18             "DBUS property error in property: {}, reason: {}", property,
19             static_cast<std::underlying_type_t<sdbusplus::UnpackErrorReason>>(
20                 reason));
21     }
22 };
23 
24 } // namespace dbus_utils
25 } // namespace redfish
26