presence: Retrieve config file location from dbus

When configured with a dbus interface and property storing the file
location of the json configuration for fan presence, retrieve it from
the associated dbus object. The first dbus object found with the given
interface is used to get the file location from the given property
on that interface. Having more than one dbus object hosting the
interface with the configuration file location property is unsupported.

Tested:
    Config file is retrieved from defined dbus object

Change-Id: I82fbd622ded11da029ed9fdac8239a69a82370f8
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/presence/json_config.cpp b/presence/json_config.cpp
index d85f721..6dc06c2 100644
--- a/presence/json_config.cpp
+++ b/presence/json_config.cpp
@@ -53,8 +53,16 @@
 JsonConfig::JsonConfig(const std::string& jsonFile) :
     _defaultFile(fs::path(jsonFile))
 {
-    // Load and process the json configuration
-    load();
+    if (!_defaultFile.empty())
+    {
+        // Load and process the json configuration
+        load();
+    }
+    else
+    {
+        log<level::ERR>("No JSON config file provided");
+        throw std::runtime_error("No JSON config file provided");
+    }
 }
 
 const policies& JsonConfig::get()