Allow multiple inputs to thermal and stepwise controllers

Use std::max to determine which input value to apply.
Also start throwing when inputs are empty as otherwise
there will be a nullptr dereference.

Tested-by: Added multiple inputs and application no longer
segfaults and verifed max was being used. Also added unit
tests.

Change-Id: I7c8eda45b99247b8e92e629f036c9a46c98d9fe2
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/errors/exception.hpp b/errors/exception.hpp
index 69d63be..c1c789a 100644
--- a/errors/exception.hpp
+++ b/errors/exception.hpp
@@ -18,3 +18,19 @@
   private:
     std::string message;
 };
+
+class ControllerBuildException : public std::exception
+{
+  public:
+    ControllerBuildException(const std::string& message) : message(message)
+    {
+    }
+
+    virtual const char* what() const noexcept override
+    {
+        return message.c_str();
+    }
+
+  private:
+    std::string message;
+};