diff options
Diffstat (limited to 'control/zone.cpp')
-rw-r--r-- | control/zone.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/control/zone.cpp b/control/zone.cpp index 14bd9d2..67e22d9 100644 --- a/control/zone.cpp +++ b/control/zone.cpp @@ -13,7 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include <phosphor-logging/log.hpp> #include <phosphor-logging/elog.hpp> +#include <phosphor-logging/elog-errors.hpp> +#include <xyz/openbmc_project/Common/error.hpp> #include "zone.hpp" #include "utility.hpp" @@ -25,6 +28,8 @@ namespace control { using namespace phosphor::logging; +using InternalFailure = sdbusplus::xyz::openbmc_project::Common:: + Error::InternalFailure; Zone::Zone(Mode mode, sdbusplus::bus::bus& bus, @@ -141,8 +146,8 @@ void Zone::getProperty(sdbusplus::bus::bus& bus, auto hostResponseMsg = bus.call(hostCall); if (hostResponseMsg.is_method_error()) { - throw std::runtime_error( - "Error in host call response for retrieving property"); + log<level::ERR>("Error in host call response for retrieving property"); + elog<InternalFailure>(); } hostResponseMsg.read(value); } |