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/test/BufferTests.cpp b/src/profiling/test/BufferTests.cpp
index c4714d6..943cfd5 100644
--- a/src/profiling/test/BufferTests.cpp
+++ b/src/profiling/test/BufferTests.cpp
@@ -9,8 +9,6 @@
 
 #include <common/include/SwTrace.hpp>
 
-#include <armnn/Exceptions.hpp>
-
 #include <doctest/doctest.h>
 
 using namespace arm::pipe;
@@ -113,7 +111,7 @@
     IPacketBufferPtr packetBuffer = std::make_unique<PacketBuffer>(8);
 
     // Cannot commit data bigger than the max size of the buffer
-    CHECK_THROWS_AS(packetBuffer->Commit(16);, armnn::RuntimeException);
+    CHECK_THROWS_AS(packetBuffer->Commit(16);, arm::pipe::ProfilingException);
 }
 
 TEST_CASE("BufferReserveTest")
@@ -384,7 +382,7 @@
     unsigned int uint32_t_size = sizeof(uint32_t);
     unsigned int offset = uint32_t_size;
     CHECK_THROWS_AS(ReadSwTraceMessage(packetBuffer->GetReadableData(), offset, packetBuffer->GetSize()),
-                      ProfilingException);
+                    arm::pipe::ProfilingException);
 
 }
 
@@ -406,7 +404,7 @@
     unsigned int uint32_t_size = sizeof(uint32_t);
     unsigned int offset = uint32_t_size;
     CHECK_THROWS_AS(ReadSwTraceMessage(packetBuffer->GetReadableData(), offset, packetBuffer->GetSize()),
-                      ProfilingException);
+                    arm::pipe::ProfilingException);
 
 }
 
diff --git a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp
index 3c4800a..fb8c972 100644
--- a/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp
+++ b/src/profiling/test/ProfilingConnectionDumpToFileDecoratorTests.cpp
@@ -82,7 +82,7 @@
     options.m_IncomingCaptureFile = "/";
     options.m_OutgoingCaptureFile =  "";
     ProfilingConnectionDumpToFileDecorator decorator(std::make_unique<DummyProfilingConnection>(), options, false);
-    CHECK_THROWS_AS(decorator.ReadPacket(0), armnn::RuntimeException);
+    CHECK_THROWS_AS(decorator.ReadPacket(0), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("DumpIncomingInvalidFileIgnoreErrors")
@@ -126,7 +126,7 @@
     options.m_IncomingCaptureFile = "";
     options.m_OutgoingCaptureFile = "/";
     ProfilingConnectionDumpToFileDecorator decorator(std::make_unique<DummyProfilingConnection>(), options, false);
-    CHECK_THROWS_AS(decorator.WritePacket(g_DataPtr, g_DataLength), armnn::RuntimeException);
+    CHECK_THROWS_AS(decorator.WritePacket(g_DataPtr, g_DataLength), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("DumpOutgoingInvalidFileIgnoreErrors")
diff --git a/src/profiling/test/ProfilingMocks.hpp b/src/profiling/test/ProfilingMocks.hpp
index ca11ae4..b9ba931 100644
--- a/src/profiling/test/ProfilingMocks.hpp
+++ b/src/profiling/test/ProfilingMocks.hpp
@@ -13,13 +13,13 @@
 #include <SendCounterPacket.hpp>
 #include <SendThread.hpp>
 
-#include <armnn/Exceptions.hpp>
 #include <armnn/Optional.hpp>
 #include <armnn/Conversion.hpp>
 #include <armnn/utility/Assert.hpp>
 #include <armnn/utility/IgnoreUnused.hpp>
 #include <armnn/utility/NumericCast.hpp>
 
+#include <common/include/ProfilingException.hpp>
 #include <common/include/ProfilingGuidGenerator.hpp>
 
 #include <atomic>
@@ -294,8 +294,8 @@
         reservedSize = 0;
         if (requestedSize > m_MaxBufferSize)
         {
-            throw armnn::InvalidArgumentException("The maximum buffer size that can be requested is [" +
-                                                  std::to_string(m_MaxBufferSize) + "] bytes");
+            throw arm::pipe::InvalidArgumentException("The maximum buffer size that can be requested is [" +
+                                                      std::to_string(m_MaxBufferSize) + "] bytes");
         }
         reservedSize = requestedSize;
         return std::make_unique<MockPacketBuffer>(requestedSize);
diff --git a/src/profiling/test/ProfilingTests.cpp b/src/profiling/test/ProfilingTests.cpp
index 128e1f1..0389377 100644
--- a/src/profiling/test/ProfilingTests.cpp
+++ b/src/profiling/test/ProfilingTests.cpp
@@ -512,29 +512,29 @@
     CHECK(profilingState8.GetCurrentState() == ProfilingState::Active);
 
     ProfilingStateMachine profilingState9(ProfilingState::Uninitialised);
-    CHECK_THROWS_AS(profilingState9.TransitionToState(ProfilingState::WaitingForAck), armnn::Exception);
+    CHECK_THROWS_AS(profilingState9.TransitionToState(ProfilingState::WaitingForAck), arm::pipe::ProfilingException);
 
     ProfilingStateMachine profilingState10(ProfilingState::Uninitialised);
-    CHECK_THROWS_AS(profilingState10.TransitionToState(ProfilingState::Active), armnn::Exception);
+    CHECK_THROWS_AS(profilingState10.TransitionToState(ProfilingState::Active), arm::pipe::ProfilingException);
 
     ProfilingStateMachine profilingState11(ProfilingState::NotConnected);
-    CHECK_THROWS_AS(profilingState11.TransitionToState(ProfilingState::Uninitialised), armnn::Exception);
+    CHECK_THROWS_AS(profilingState11.TransitionToState(ProfilingState::Uninitialised), arm::pipe::ProfilingException);
 
     ProfilingStateMachine profilingState12(ProfilingState::NotConnected);
-    CHECK_THROWS_AS(profilingState12.TransitionToState(ProfilingState::Active), armnn::Exception);
+    CHECK_THROWS_AS(profilingState12.TransitionToState(ProfilingState::Active), arm::pipe::ProfilingException);
 
     ProfilingStateMachine profilingState13(ProfilingState::WaitingForAck);
-    CHECK_THROWS_AS(profilingState13.TransitionToState(ProfilingState::Uninitialised), armnn::Exception);
+    CHECK_THROWS_AS(profilingState13.TransitionToState(ProfilingState::Uninitialised), arm::pipe::ProfilingException);
 
     ProfilingStateMachine profilingState14(ProfilingState::WaitingForAck);
     profilingState14.TransitionToState(ProfilingState::NotConnected);
     CHECK(profilingState14.GetCurrentState() == ProfilingState::NotConnected);
 
     ProfilingStateMachine profilingState15(ProfilingState::Active);
-    CHECK_THROWS_AS(profilingState15.TransitionToState(ProfilingState::Uninitialised), armnn::Exception);
+    CHECK_THROWS_AS(profilingState15.TransitionToState(ProfilingState::Uninitialised), arm::pipe::ProfilingException);
 
     ProfilingStateMachine profilingState16(ProfilingState::Active);
-    CHECK_THROWS_AS(profilingState16.TransitionToState(ProfilingState::WaitingForAck), armnn::Exception);
+    CHECK_THROWS_AS(profilingState16.TransitionToState(ProfilingState::WaitingForAck), arm::pipe::ProfilingException);
 
     ProfilingStateMachine profilingState17(ProfilingState::Uninitialised);
 
@@ -998,7 +998,8 @@
 
     // Register a device with the name of a device already registered
     const Device* deviceSameName = nullptr;
-    CHECK_THROWS_AS(deviceSameName = counterDirectory.RegisterDevice(deviceName), arm::pipe::InvalidArgumentException);
+    CHECK_THROWS_AS(deviceSameName = counterDirectory.RegisterDevice(deviceName),
+                                     arm::pipe::InvalidArgumentException);
     CHECK(counterDirectory.GetDeviceCount() == 1);
     CHECK(!deviceSameName);
 
@@ -1831,11 +1832,11 @@
                                                           readCounterValues, sendCounterPacket, profilingStateMachine);
 
     profilingStateMachine.TransitionToState(ProfilingState::Uninitialised);
-    CHECK_THROWS_AS(commandHandler(packetA), armnn::RuntimeException);
+    CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException);
     profilingStateMachine.TransitionToState(ProfilingState::NotConnected);
-    CHECK_THROWS_AS(commandHandler(packetA), armnn::RuntimeException);
+    CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException);
     profilingStateMachine.TransitionToState(ProfilingState::WaitingForAck);
-    CHECK_THROWS_AS(commandHandler(packetA), armnn::RuntimeException);
+    CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException);
     profilingStateMachine.TransitionToState(ProfilingState::Active);
     CHECK_NOTHROW(commandHandler(packetA));
 
@@ -1959,15 +1960,18 @@
     arm::pipe::Packet ActivateTimelineReportingPacket(packetHeader1); // Length == 0
 
     CHECK_THROWS_AS(
-            activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket), armnn::Exception);
+        activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket),
+                                                           arm::pipe::ProfilingException);
 
     stateMachine.TransitionToState(ProfilingState::NotConnected);
     CHECK_THROWS_AS(
-            activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket), armnn::Exception);
+        activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket),
+                                                           arm::pipe::ProfilingException);
 
     stateMachine.TransitionToState(ProfilingState::WaitingForAck);
     CHECK_THROWS_AS(
-            activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket), armnn::Exception);
+        activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket),
+                                                           arm::pipe::ProfilingException);
 
     stateMachine.TransitionToState(ProfilingState::Active);
     activateTimelineReportingCommandHandler.operator()(ActivateTimelineReportingPacket);
@@ -1992,15 +1996,18 @@
 
     stateMachine.Reset();
     CHECK_THROWS_AS(
-            deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket), armnn::Exception);
+        deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket),
+                                                             arm::pipe::ProfilingException);
 
     stateMachine.TransitionToState(ProfilingState::NotConnected);
     CHECK_THROWS_AS(
-            deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket), armnn::Exception);
+        deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket),
+                                                             arm::pipe::ProfilingException);
 
     stateMachine.TransitionToState(ProfilingState::WaitingForAck);
     CHECK_THROWS_AS(
-            deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket), armnn::Exception);
+        deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket),
+                                                             arm::pipe::ProfilingException);
 
     stateMachine.TransitionToState(ProfilingState::Active);
     deactivateTimelineReportingCommandHandler.operator()(deactivateTimelineReportingPacket);
@@ -2076,12 +2083,12 @@
                                                         mockProfilingServiceStatus);
 
     // command handler received packet on ProfilingState::Uninitialised
-    CHECK_THROWS_AS(commandHandler(packetA), armnn::Exception);
+    CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException);
 
     profilingState.TransitionToState(ProfilingState::NotConnected);
     CHECK(profilingState.GetCurrentState() == ProfilingState::NotConnected);
     // command handler received packet on ProfilingState::NotConnected
-    CHECK_THROWS_AS(commandHandler(packetA), armnn::Exception);
+    CHECK_THROWS_AS(commandHandler(packetA), arm::pipe::ProfilingException);
 
     profilingState.TransitionToState(ProfilingState::WaitingForAck);
     CHECK(profilingState.GetCurrentState() == ProfilingState::WaitingForAck);
@@ -2106,7 +2113,7 @@
                                                                  sendTimelinePacket,
                                                                  profilingState,
                                                                  mockProfilingServiceStatus);
-    CHECK_THROWS_AS(differentCommandHandler(packetB), armnn::Exception);
+    CHECK_THROWS_AS(differentCommandHandler(packetB), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("CheckSocketConnectionException")
@@ -2438,13 +2445,13 @@
     arm::pipe::Packet wrongPacket(wrongHeader);
 
     profilingStateMachine.TransitionToState(ProfilingState::Uninitialised);
-    CHECK_THROWS_AS(commandHandler(wrongPacket), armnn::RuntimeException); // Wrong profiling state
+    CHECK_THROWS_AS(commandHandler(wrongPacket), arm::pipe::ProfilingException); // Wrong profiling state
     profilingStateMachine.TransitionToState(ProfilingState::NotConnected);
-    CHECK_THROWS_AS(commandHandler(wrongPacket), armnn::RuntimeException); // Wrong profiling state
+    CHECK_THROWS_AS(commandHandler(wrongPacket), arm::pipe::ProfilingException); // Wrong profiling state
     profilingStateMachine.TransitionToState(ProfilingState::WaitingForAck);
-    CHECK_THROWS_AS(commandHandler(wrongPacket), armnn::RuntimeException); // Wrong profiling state
+    CHECK_THROWS_AS(commandHandler(wrongPacket), arm::pipe::ProfilingException); // Wrong profiling state
     profilingStateMachine.TransitionToState(ProfilingState::Active);
-    CHECK_THROWS_AS(commandHandler(wrongPacket), armnn::InvalidArgumentException); // Wrong packet
+    CHECK_THROWS_AS(commandHandler(wrongPacket), arm::pipe::InvalidArgumentException); // Wrong packet
 
     const uint32_t rightHeader = (packetId & 0x000003FF) << 16;
 
@@ -2505,11 +2512,11 @@
                                      "categoryA", 1, 1, 3.0f, "counterB", "descB");
 
     profilingStateMachine.TransitionToState(ProfilingState::Uninitialised);
-    CHECK_THROWS_AS(commandHandler(packet), armnn::RuntimeException);    // Wrong profiling state
+    CHECK_THROWS_AS(commandHandler(packet), arm::pipe::ProfilingException);    // Wrong profiling state
     profilingStateMachine.TransitionToState(ProfilingState::NotConnected);
-    CHECK_THROWS_AS(commandHandler(packet), armnn::RuntimeException);    // Wrong profiling state
+    CHECK_THROWS_AS(commandHandler(packet), arm::pipe::ProfilingException);    // Wrong profiling state
     profilingStateMachine.TransitionToState(ProfilingState::WaitingForAck);
-    CHECK_THROWS_AS(commandHandler(packet), armnn::RuntimeException);    // Wrong profiling state
+    CHECK_THROWS_AS(commandHandler(packet), arm::pipe::ProfilingException);    // Wrong profiling state
     profilingStateMachine.TransitionToState(ProfilingState::Active);
     CHECK_NOTHROW(commandHandler(packet));
 
@@ -3409,8 +3416,8 @@
 TEST_CASE("CheckCounterIdMap")
 {
     CounterIdMap counterIdMap;
-    CHECK_THROWS_AS(counterIdMap.GetBackendId(0), armnn::Exception);
-    CHECK_THROWS_AS(counterIdMap.GetGlobalId(0, armnn::profiling::BACKEND_ID), armnn::Exception);
+    CHECK_THROWS_AS(counterIdMap.GetBackendId(0), arm::pipe::ProfilingException);
+    CHECK_THROWS_AS(counterIdMap.GetGlobalId(0, armnn::profiling::BACKEND_ID), arm::pipe::ProfilingException);
 
     uint16_t globalCounterIds = 0;
 
diff --git a/src/profiling/test/ProfilingTests.hpp b/src/profiling/test/ProfilingTests.hpp
index e1590bd..ed3e03d 100644
--- a/src/profiling/test/ProfilingTests.hpp
+++ b/src/profiling/test/ProfilingTests.hpp
@@ -96,7 +96,7 @@
         else
         {
             std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
-            throw armnn::TimeoutException("Simulate a timeout error\n");
+            throw arm::pipe::TimeoutException("Simulate a timeout error\n");
         }
     }
 
@@ -117,7 +117,7 @@
         {
             std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
             ++m_ReadRequests;
-            throw armnn::TimeoutException("Simulate a timeout error\n");
+            throw arm::pipe::TimeoutException("Simulate a timeout error\n");
         }
 
         return arm::pipe::Packet(65536);
@@ -143,7 +143,7 @@
     {
         armnn::IgnoreUnused(timeout);
         ++m_ReadRequests;
-        throw armnn::Exception("Simulate a non-timeout error");
+        throw arm::pipe::ProfilingException("Simulate a non-timeout error");
     }
 
     int ReadCalledCount()
diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp
index 1380b42..cfcd64b 100644
--- a/src/profiling/test/SendCounterPacketTests.cpp
+++ b/src/profiling/test/SendCounterPacketTests.cpp
@@ -14,11 +14,11 @@
 #include <SendCounterPacket.hpp>
 #include <Processes.hpp>
 
-#include <armnn/Exceptions.hpp>
 #include <armnn/Conversion.hpp>
 #include <armnn/Utils.hpp>
 
 #include <common/include/Constants.hpp>
+#include <common/include/ProfilingException.hpp>
 
 #include <armnn/utility/Assert.hpp>
 
@@ -1673,7 +1673,7 @@
     // Buffer with enough space
     MockBufferManager mockBuffer(1024);
     SendCounterPacket sendCounterPacket(mockBuffer);
-    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException);
+    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("SendCounterDirectoryPacketTest4")
@@ -1691,7 +1691,7 @@
     // Buffer with enough space
     MockBufferManager mockBuffer(1024);
     SendCounterPacket sendCounterPacket(mockBuffer);
-    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException);
+    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("SendCounterDirectoryPacketTest5")
@@ -1709,7 +1709,7 @@
     // Buffer with enough space
     MockBufferManager mockBuffer(1024);
     SendCounterPacket sendCounterPacket(mockBuffer);
-    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException);
+    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("SendCounterDirectoryPacketTest6")
@@ -1741,7 +1741,7 @@
     // Buffer with enough space
     MockBufferManager mockBuffer(1024);
     SendCounterPacket sendCounterPacket(mockBuffer);
-    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException);
+    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("SendCounterDirectoryPacketTest7")
@@ -1790,7 +1790,7 @@
     // Buffer with enough space
     MockBufferManager mockBuffer(1024);
     SendCounterPacket sendCounterPacket(mockBuffer);
-    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), armnn::RuntimeException);
+    CHECK_THROWS_AS(sendCounterPacket.SendCounterDirectoryPacket(counterDirectory), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("SendThreadTest0")
@@ -2263,7 +2263,7 @@
     sendThread.Start(mockProfilingConnection);
 
     // The profiling state is set to "Uninitialized", so the send thread should throw an exception
-    CHECK_THROWS_AS(sendThread.Stop(), armnn::RuntimeException);
+    CHECK_THROWS_AS(sendThread.Stop(), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("SendThreadSendStreamMetadataPacket2")
@@ -2278,7 +2278,7 @@
     sendThread.Start(mockProfilingConnection);
 
     // The profiling state is set to "NotConnected", so the send thread should throw an exception
-    CHECK_THROWS_AS(sendThread.Stop(), armnn::RuntimeException);
+    CHECK_THROWS_AS(sendThread.Stop(), arm::pipe::ProfilingException);
 }
 
 TEST_CASE("SendThreadSendStreamMetadataPacket3")
diff --git a/src/profiling/test/SendCounterPacketTests.hpp b/src/profiling/test/SendCounterPacketTests.hpp
index 4dec67d..bae08b2 100644
--- a/src/profiling/test/SendCounterPacketTests.hpp
+++ b/src/profiling/test/SendCounterPacketTests.hpp
@@ -10,13 +10,13 @@
 #include <ProfilingUtils.hpp>
 #include <IProfilingConnectionFactory.hpp>
 
-#include <armnn/Exceptions.hpp>
 #include <armnn/Optional.hpp>
 #include <armnn/Conversion.hpp>
 #include <armnn/utility/Assert.hpp>
 #include <armnn/utility/IgnoreUnused.hpp>
 #include <armnn/utility/NumericCast.hpp>
 
+
 #include <atomic>
 #include <condition_variable>
 #include <mutex>
diff --git a/src/profiling/test/SendTimelinePacketTests.cpp b/src/profiling/test/SendTimelinePacketTests.cpp
index 76fa9c1..eb6a262 100644
--- a/src/profiling/test/SendTimelinePacketTests.cpp
+++ b/src/profiling/test/SendTimelinePacketTests.cpp
@@ -399,7 +399,7 @@
     std::unique_ptr<ISendTimelinePacket> sendTimelinePacket = timelinePacketWriterFactory.GetSendTimelinePacket();
 
     CHECK_THROWS_AS(sendTimelinePacket->SendTimelineMessageDirectoryPackage(),
-                      armnn::RuntimeException);
+                    arm::pipe::ProfilingException);
 }
 
 TEST_CASE("SendTimelinePacketTests3")
diff --git a/src/profiling/test/TestTimelinePacketHandler.cpp b/src/profiling/test/TestTimelinePacketHandler.cpp
index d38c175..46f0549 100644
--- a/src/profiling/test/TestTimelinePacketHandler.cpp
+++ b/src/profiling/test/TestTimelinePacketHandler.cpp
@@ -39,7 +39,7 @@
     {
         std::stringstream ss;
         ss << "Received a packet with unknown header [" << packet.GetHeader() << "]";
-        throw armnn::Exception(ss.str());
+        throw arm::pipe::ProfilingException(ss.str());
     }
 }
 
@@ -63,7 +63,7 @@
         std::chrono::duration<double, std::milli> elapsed = finish - start;
         std::stringstream ss;
         ss << "Timed out waiting on inference completion for " << elapsed.count() << " ms";
-        throw armnn::TimeoutException(ss.str());
+        throw arm::pipe::TimeoutException(ss.str());
     }
     return;
 }
@@ -138,4 +138,4 @@
 
 } // namespace pipe
 
-} // namespace arm
\ No newline at end of file
+} // namespace arm
diff --git a/src/profiling/test/TimelineUtilityMethodsTests.cpp b/src/profiling/test/TimelineUtilityMethodsTests.cpp
index 0833eb4..422bc13 100644
--- a/src/profiling/test/TimelineUtilityMethodsTests.cpp
+++ b/src/profiling/test/TimelineUtilityMethodsTests.cpp
@@ -306,7 +306,7 @@
     CHECK_THROWS_AS(timelineUtilityMethods.DeclareLabel(""), arm::pipe::InvalidArgumentException);
 
     // Try declaring an invalid (wrong SWTrace format) label
-    CHECK_THROWS_AS(timelineUtilityMethods.DeclareLabel("inv@lid lab€l"), RuntimeException);
+    CHECK_THROWS_AS(timelineUtilityMethods.DeclareLabel("inv@lid lab€l"), arm::pipe::ProfilingException);
 
     // Declare a valid label
     const std::string labelName = "valid label";