associations: Handle SdBusError exception
In checkIfPendingAssociation() it could create new interface on DBus
objects. The interface::interface() could throw if it fails, and mapperx
would crash due to the exception:
phosphor-mapper[428]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'
phosphor-mapper[428]: what(): sd_bus_add_object_vtable: org.freedesktop.DBus.Error.InvalidArgs: Invalid argument
Workaround this issue by adding try-catch and skip the interface to
prevent mapperx from crash.
Fixes openbmc/phosphor-objmgr#21
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Ibe3e887dcd95c01e1270bf218fd47572852e1e54
1 file changed