Error handling for GpioMonitor class

In case of any exception in the construction of GpioMonitor class, VPD
Manager need not skip rest of the processings.
Instead, code has been modified to handle the exception locally by
logging appropriate PEL and allowing VPD-Manager to continue with rest
of the processings.

Change-Id: Iccf421da175ec264a8aff149c360ba7ad105fbe9
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
diff --git a/vpd-manager/include/gpio_monitor.hpp b/vpd-manager/include/gpio_monitor.hpp
index 476a31d..48254c2 100644
--- a/vpd-manager/include/gpio_monitor.hpp
+++ b/vpd-manager/include/gpio_monitor.hpp
@@ -1,5 +1,6 @@
 #pragma once
 
+#include "event_logger.hpp"
 #include "worker.hpp"
 
 #include <boost/asio/steady_timer.hpp>
@@ -115,8 +116,11 @@
         }
         else
         {
-            throw std::runtime_error(
-                "Gpio Monitoring can't be instantiated with empty config JSON");
+            EventLogger::createSyncPel(
+                types::ErrorType::InternalFailure, types::SeverityType::Warning,
+                __FILE__, __FUNCTION__, 0,
+                "Gpio Monitoring can't be instantiated with empty config JSON",
+                std::nullopt, std::nullopt, std::nullopt, std::nullopt);
         }
     }