Add error handling for message parsing

Some of the signals we try and parse for error logs are not structured
in the format we expect when parsing. When error logging is enabled in
sdbusplus this causes the phosphor-dump-manager to crash. Fix this
crashing by logging errors and ignoring the bad signals.

Change-Id: Ieadcb7e95f622005382f3c4957bf1535e3bb1ef9
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/core_manager.cpp b/core_manager.cpp
index dfa1aeb..3ab726b 100644
--- a/core_manager.cpp
+++ b/core_manager.cpp
@@ -2,6 +2,7 @@
 #include <experimental/filesystem>
 
 #include <phosphor-logging/log.hpp>
+#include <sdbusplus/exception.hpp>
 
 #include "core_manager.hpp"
 #include "config.h"
@@ -72,7 +73,17 @@
     }
 
     map<string, vector<string>> mapperResponse;
-    mapperResponseMsg.read(mapperResponse);
+    try
+    {
+        mapperResponseMsg.read(mapperResponse);
+    }
+    catch (const sdbusplus::exception::SdBusError& e)
+    {
+        log<level::ERR>("Failed to parse dump create message",
+                        entry("ERROR=%s", e.what()),
+                        entry("REPLY_SIG=%s", mapperResponseMsg.get_signature()));
+        return;
+    }
     if (mapperResponse.empty())
     {
         log<level::ERR>("Error reading mapper response");