Enhance exception throwing with Boost Exception library

Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4962ba
Refs: #2997
diff --git a/src/name.hpp b/src/name.hpp
index d6040e6..7e228b7 100644
--- a/src/name.hpp
+++ b/src/name.hpp
@@ -443,7 +443,7 @@
   {
     if ((i >= 0 && static_cast<size_t>(i) >= size()) ||
         (i < 0  && static_cast<size_t>(-i) > size()))
-      throw Error("Requested component does not exist (out of bounds)");
+      BOOST_THROW_EXCEPTION(Error("Requested component does not exist (out of bounds)"));
 
     return get(i);
   }