Make out of tree builds work again

Remove hunter and remove dependency on phosphor-dbus-interfaces
because it is difficult to build out of tree.

Change-Id: If2438233f6d0a70c8f7b8db9b72e8110fb0ce2dc
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/FruDevice.cpp b/src/FruDevice.cpp
index 99dd731..34eb927 100644
--- a/src/FruDevice.cpp
+++ b/src/FruDevice.cpp
@@ -30,7 +30,6 @@
 #include <sys/ioctl.h>
 #include <regex>
 #include <sys/inotify.h>
-#include <xyz/openbmc_project/Common/error.hpp>
 #include <errno.h>
 
 namespace fs = std::experimental::filesystem;
@@ -520,8 +519,7 @@
         {
             std::cerr << "Error opening file " << BASEBOARD_FRU_LOCATION
                       << "\n";
-            throw sdbusplus::xyz::openbmc_project::Common::Error::
-                InternalFailure();
+            throw DBusInternalError();
             return false;
         }
         file.write(reinterpret_cast<const char *>(fru.data()), fru.size());
@@ -535,16 +533,14 @@
         if (file < 0)
         {
             std::cerr << "unable to open i2c device " << i2cBus << "\n";
-            throw sdbusplus::xyz::openbmc_project::Common::Error::
-                InternalFailure();
+            throw DBusInternalError();
             return false;
         }
         if (ioctl(file, I2C_SLAVE_FORCE, address) < 0)
         {
             std::cerr << "unable to set device address\n";
             close(file);
-            throw sdbusplus::xyz::openbmc_project::Common::Error::
-                InternalFailure();
+            throw DBusInternalError();
             return false;
         }
 
@@ -562,8 +558,7 @@
                 {
                     std::cerr << "unable to set device address\n";
                     close(file);
-                    throw sdbusplus::xyz::openbmc_project::Common::Error::
-                        InternalFailure();
+                    throw DBusInternalError();
                     return false;
                 }
             }
@@ -575,8 +570,7 @@
                     std::cerr << "error writing fru: " << strerror(errno)
                               << "\n";
                     close(file);
-                    throw sdbusplus::xyz::openbmc_project::Common::Error::
-                        InternalFailure();
+                    throw DBusInternalError();
                     return false;
                 }
             }
@@ -690,14 +684,12 @@
             auto deviceMap = busmap.find(bus);
             if (deviceMap == busmap.end())
             {
-                throw sdbusplus::xyz::openbmc_project::Common::Error::
-                    InvalidArgument();
+                throw std::invalid_argument("Invalid Bus.");
             }
             auto device = deviceMap->second->find(address);
             if (device == deviceMap->second->end())
             {
-                throw sdbusplus::xyz::openbmc_project::Common::Error::
-                    InvalidArgument();
+                throw std::invalid_argument("Invalid Address.");
             }
             std::vector<uint8_t> &ret =
                 reinterpret_cast<std::vector<uint8_t> &>(device->second);
@@ -709,13 +701,11 @@
                                            const std::vector<uint8_t> &data) {
         if (!writeFru(bus, address, data))
         {
-            throw sdbusplus::xyz::openbmc_project::Common::Error::
-                InvalidArgument();
+            throw std::invalid_argument("Invalid Arguments.");
             return;
         }
         // schedule rescan on success
         rescanBusses(io, busmap, dbusInterfaceMap, systemBus, objServer);
-
     });
     iface->initialize();