aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/ActivateTimelineReportingCommandHandler.cpp
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2022-03-08 21:23:44 +0000
committerJim Flynn <jim.flynn@arm.com>2022-03-09 22:14:52 +0000
commitf9db3efe5ce2b989b59c47056e1b84b32d2f1100 (patch)
treeb1fd75d5f951f9036a8f0b37211fc30b4d651262 /src/profiling/ActivateTimelineReportingCommandHandler.cpp
parent0e5588f3289845d1bd7597ade081764018eda2cc (diff)
downloadarmnn-f9db3efe5ce2b989b59c47056e1b84b32d2f1100.tar.gz
IVGCVSW-6821 Remove dependency on armnn::Exception classes from the Profiling code
Change-Id: Id46a9a0576091df21b2af5b472f1ca5c6335e8a3 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'src/profiling/ActivateTimelineReportingCommandHandler.cpp')
-rw-r--r--src/profiling/ActivateTimelineReportingCommandHandler.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/profiling/ActivateTimelineReportingCommandHandler.cpp b/src/profiling/ActivateTimelineReportingCommandHandler.cpp
index 940b823978..bc814f0278 100644
--- a/src/profiling/ActivateTimelineReportingCommandHandler.cpp
+++ b/src/profiling/ActivateTimelineReportingCommandHandler.cpp
@@ -8,7 +8,8 @@
#include <ArmNNProfilingServiceInitialiser.hpp>
#include <armnn/profiling/ArmNNProfiling.hpp>
-#include <armnn/Exceptions.hpp>
+#include <common/include/ProfilingException.hpp>
+
#include <fmt/format.h>
namespace arm
@@ -23,8 +24,9 @@ void ActivateTimelineReportingCommandHandler::operator()(const arm::pipe::Packet
if (!m_ReportStructure.has_value())
{
- throw armnn::Exception(std::string("Profiling Service constructor must be initialised with an "
- "IReportStructure argument in order to run timeline reporting"));
+ throw arm::pipe::ProfilingException(std::string(
+ "Profiling Service constructor must be initialised with an "
+ "IReportStructure argument in order to run timeline reporting"));
}
switch ( currentState )
@@ -32,13 +34,14 @@ void ActivateTimelineReportingCommandHandler::operator()(const arm::pipe::Packet
case ProfilingState::Uninitialised:
case ProfilingState::NotConnected:
case ProfilingState::WaitingForAck:
- throw armnn::RuntimeException(fmt::format(
+ throw arm::pipe::ProfilingException(fmt::format(
"Activate Timeline Reporting Command Handler invoked while in a wrong state: {}",
GetProfilingStateName(currentState)));
case ProfilingState::Active:
if ( !( packet.GetPacketFamily() == 0u && packet.GetPacketId() == 6u ))
{
- throw armnn::Exception(std::string("Expected Packet family = 0, id = 6 but received family =")
+ throw arm::pipe::ProfilingException(std::string(
+ "Expected Packet family = 0, id = 6 but received family =")
+ std::to_string(packet.GetPacketFamily())
+ " id = " + std::to_string(packet.GetPacketId()));
}
@@ -61,11 +64,11 @@ void ActivateTimelineReportingCommandHandler::operator()(const arm::pipe::Packet
break;
default:
- throw armnn::RuntimeException(fmt::format("Unknown profiling service state: {}",
- static_cast<int>(currentState)));
+ throw arm::pipe::ProfilingException(fmt::format("Unknown profiling service state: {}",
+ static_cast<int>(currentState)));
}
}
} // namespace pipe
-} // namespace arm \ No newline at end of file
+} // namespace arm