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/system.cpp b/monitor/system.cpp
index 0447cfa..9da828b 100644
--- a/monitor/system.cpp
+++ b/monitor/system.cpp
@@ -537,8 +537,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);
+    }
 }
 
 } // namespace phosphor::fan::monitor