phosphor-fan-presence elog error exception.

Implemented elog exception for phosphor fan presence,
replacing runtime_errors.

Change-Id: I70465060838b2cbaeadccf84ed5924e222ac59e3
Signed-off-by: Dinesh Chinari <chinari@us.ibm.com>
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 @@
 {
 
 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 @@
     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);
 }