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
tree: fe6b5f748fbba851f19419058a38aa320534082d
  1. fail-monitor/
  2. libmapper/
  3. src/
  4. .clang-format
  5. .gitignore
  6. bootstrap.sh
  7. configure.ac
  8. LICENSE
  9. MAINTAINERS
  10. Makefile.am
  11. README.md
README.md

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.