regulators: Add info to WriteVerificationError

Add more information to the WriteVerificationError exception:
* Unique ID of the device where the error occurred
* Inventory path of the device where the error occurred

This information is required in order to create an error log entry based
on the exception.

Modify files that currently use WriteVerificationError to adapt to the
new constructor and get methods.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I1e7fb321efe86b54dcd32a9752ec7465be90ad48
diff --git a/phosphor-regulators/src/write_verification_error.hpp b/phosphor-regulators/src/write_verification_error.hpp
index ec9d7a6..bd92ce5 100644
--- a/phosphor-regulators/src/write_verification_error.hpp
+++ b/phosphor-regulators/src/write_verification_error.hpp
@@ -45,13 +45,38 @@
      * Constructor.
      *
      * @param error error message
+     * @param deviceID unique ID of the device where error occurred
+     * @param inventoryPath inventory path of the device where error occurred
      */
-    explicit WriteVerificationError(const std::string& error) :
-        error{"WriteVerificationError: " + error}
+    explicit WriteVerificationError(const std::string& error,
+                                    const std::string& deviceID,
+                                    const std::string& inventoryPath) :
+        error{"WriteVerificationError: " + error},
+        deviceID{deviceID}, inventoryPath{inventoryPath}
     {
     }
 
     /**
+     * Returns the unique ID of the device where the error occurred.
+     *
+     * @return device ID
+     */
+    const std::string& getDeviceID() const
+    {
+        return deviceID;
+    }
+
+    /**
+     * Returns the inventory path of the device where the error occurred.
+     *
+     * @return inventory path
+     */
+    const std::string& getInventoryPath() const
+    {
+        return inventoryPath;
+    }
+
+    /**
      * Returns the description of this error.
      *
      * @return error description
@@ -66,6 +91,16 @@
      * Error message.
      */
     const std::string error{};
+
+    /**
+     * Unique ID of the device where the error occurred.
+     */
+    const std::string deviceID{};
+
+    /**
+     * Inventory path of the device where the error occurred.
+     */
+    const std::string inventoryPath{};
 };
 
 } // namespace phosphor::power::regulators