IVGCVSW-6821 Remove dependency on armnn::Exception classes from the Profiling code

Change-Id: Id46a9a0576091df21b2af5b472f1ca5c6335e8a3
Signed-off-by: Jim Flynn <jim.flynn@arm.com>
diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp
index 38417e8..c91a02a 100644
--- a/src/profiling/SendCounterPacket.cpp
+++ b/src/profiling/SendCounterPacket.cpp
@@ -4,15 +4,17 @@
 //
 
 #include "SendCounterPacket.hpp"
-#include <common/include/EncodeVersion.hpp>
 
-#include <armnn/Exceptions.hpp>
+#include <common/include/Constants.hpp>
+#include <common/include/EncodeVersion.hpp>
+#include <common/include/ProfilingException.hpp>
+#include <common/include/SwTrace.hpp>
+
 #include <armnn/Conversion.hpp>
 #include <Processes.hpp>
+
 #include <armnn/utility/Assert.hpp>
 #include <armnn/utility/NumericCast.hpp>
-#include <common/include/Constants.hpp>
-#include <common/include/SwTrace.hpp>
 
 #include <fmt/format.h>
 
@@ -88,7 +90,7 @@
 
     if (writeBuffer == nullptr || reserved < totalSize)
     {
-        CancelOperationAndThrow<BufferExhaustion>(
+        CancelOperationAndThrow<arm::pipe::BufferExhaustion>(
             writeBuffer,
             fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize));
     }
@@ -164,7 +166,7 @@
     }
     catch(...)
     {
-        CancelOperationAndThrow<armnn::RuntimeException>(writeBuffer, "Error processing packet.");
+        CancelOperationAndThrow<arm::pipe::ProfilingException>(writeBuffer, "Error processing packet.");
     }
 
     m_BufferManager.Commit(writeBuffer, totalSize, false);
@@ -584,7 +586,7 @@
         std::string errorMessage;
         if (!CreateDeviceRecord(device, deviceRecord, errorMessage))
         {
-            CancelOperationAndThrow<armnn::RuntimeException>(errorMessage);
+            CancelOperationAndThrow<arm::pipe::ProfilingException>(errorMessage);
         }
 
         // Update the total size in words of the device records
@@ -619,7 +621,7 @@
         std::string errorMessage;
         if (!CreateCounterSetRecord(counterSet, counterSetRecord, errorMessage))
         {
-            CancelOperationAndThrow<armnn::RuntimeException>(errorMessage);
+            CancelOperationAndThrow<arm::pipe::ProfilingException>(errorMessage);
         }
 
         // Update the total size in words of the counter set records
@@ -654,7 +656,7 @@
         std::string errorMessage;
         if (!CreateCategoryRecord(category, counterDirectory.GetCounters(), categoryRecord, errorMessage))
         {
-            CancelOperationAndThrow<armnn::RuntimeException>(errorMessage);
+            CancelOperationAndThrow<arm::pipe::ProfilingException>(errorMessage);
         }
 
         // Update the total size in words of the category records
@@ -807,7 +809,7 @@
 
     if (writeBuffer == nullptr || reserved < totalSize)
     {
-        CancelOperationAndThrow<BufferExhaustion>(
+        CancelOperationAndThrow<arm::pipe::BufferExhaustion>(
             writeBuffer,
             fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize));
     }
@@ -844,7 +846,7 @@
 
     if (writeBuffer == nullptr || reserved < totalSize)
     {
-        CancelOperationAndThrow<BufferExhaustion>(
+        CancelOperationAndThrow<arm::pipe::BufferExhaustion>(
             writeBuffer,
             fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize));
     }
@@ -893,7 +895,7 @@
 
     if (writeBuffer == nullptr || reserved < totalSize)
     {
-        CancelOperationAndThrow<BufferExhaustion>(
+        CancelOperationAndThrow<arm::pipe::BufferExhaustion>(
             writeBuffer,
             fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize));
     }