diff options
Diffstat (limited to 'src/profiling/ActivateTimelineReportingCommandHandler.cpp')
-rw-r--r-- | src/profiling/ActivateTimelineReportingCommandHandler.cpp | 19 |
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 |