monitor,sensor-monitor: catch exceptions when creating BMC dumps

catch and log exceptions thrown when creating BMC dumps

Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Change-Id: I986ca3e51302016886ca8ae571054a5b4260a093
diff --git a/monitor/power_off_action.hpp b/monitor/power_off_action.hpp
index cada348..c833038 100644
--- a/monitor/power_off_action.hpp
+++ b/monitor/power_off_action.hpp
@@ -110,8 +110,13 @@
                 std::vector<std::pair<std::string,
                                       std::variant<std::string, uint64_t>>>());
         }
-        catch (const sdbusplus::exception::exception&)
-        {}
+        catch (const std::exception& e)
+        {
+            getLogger().log(
+                fmt::format("Caught exception while creating BMC dump: {}",
+                            e.what()),
+                Logger::error);
+        }
     }
 
     /**