bios_utils: BIOSTableIter: Failure to create iter throws exception

It's possible that the heap allocation invoked by
pldm_bios_table_iter_create() fails. The existing behaviour is to
assert() in the implementation that it hadn't failed, but that will be
changed to instead have the API return NULL.

Check for the NULL condition with the understanding that it may occur in
the future, and if observed, throw an exception to uphold the existing
assumptions in the code.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I20016e8db4c814017306cc68a536a9c232c74e0e
diff --git a/common/bios_utils.hpp b/common/bios_utils.hpp
index d9ffb21..e1a98d3 100644
--- a/common/bios_utils.hpp
+++ b/common/bios_utils.hpp
@@ -51,10 +51,16 @@
          *  @param[in] data - Pointer to a table
          *  @param[in] length - The length of the table
          */
-        explicit iterator(const void* data, size_t length) noexcept :
+        explicit iterator(const void* data, size_t length) :
             iter(pldm_bios_table_iter_create(data, length, tableType),
                  pldm_bios_table_iter_free)
-        {}
+        {
+            if (!iter)
+            {
+                throw std::runtime_error(
+                    "Unable to create bios table iterator");
+            }
+        }
 
         /** @brief Get the entry pointed by the iterator
          *