Handle exceptions from `sendCommand` in `ec_util.cpp`

`sendCommand` in `ec_util.cpp` can throw `CommandRunException`
exception. This exception is not handled at few places and can cause
`hothd` to crash.

This commit makes changes to catch all exceptions in functions which
internally call this `sendCommand` method. Since `sendCommand` is a
private method in `EcUtilImpl`, I looked at callers of methods in
`ec_util.cpp` to find places where exception handling needs to be added.

I added logic to throw `ResponseFailure` in methods that return value
for DBus methods in
`yaml/xyz/openbmc_project/Control/Hoth.interface.yaml` since the YAML
config declares this error

For `PayloadVersion::version()` method, since this is based on
`sdbusplus::xyz::openbmc_project::Software::server::Version` interface,
I added logic to return `SdBusError` exception.

I also removed `EcUtilImpl::getHothPersistentPanicInfo` and updated the
unit tests since that method does not seem to be used anywhere currently

I tested the change by following steps that crash hothd without this
change. With this change, I observed that hothd did not crash after I
followed those steps.

Google-Bug-Id: 552303543
Change-Id: Ic5ba46a56376227b20c92ddebb8e1cc08db52a17
5 files changed