From f9db3efe5ce2b989b59c47056e1b84b32d2f1100 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Tue, 8 Mar 2022 21:23:44 +0000 Subject: IVGCVSW-6821 Remove dependency on armnn::Exception classes from the Profiling code Change-Id: Id46a9a0576091df21b2af5b472f1ca5c6335e8a3 Signed-off-by: Jim Flynn --- src/profiling/SendCounterPacket.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/profiling/SendCounterPacket.cpp') diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp index 38417e8ecd..c91a02acce 100644 --- a/src/profiling/SendCounterPacket.cpp +++ b/src/profiling/SendCounterPacket.cpp @@ -4,15 +4,17 @@ // #include "SendCounterPacket.hpp" + +#include #include +#include +#include -#include #include #include + #include #include -#include -#include #include @@ -88,7 +90,7 @@ void SendCounterPacket::SendStreamMetaDataPacket() if (writeBuffer == nullptr || reserved < totalSize) { - CancelOperationAndThrow( + CancelOperationAndThrow( writeBuffer, fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize)); } @@ -164,7 +166,7 @@ void SendCounterPacket::SendStreamMetaDataPacket() } catch(...) { - CancelOperationAndThrow(writeBuffer, "Error processing packet."); + CancelOperationAndThrow(writeBuffer, "Error processing packet."); } m_BufferManager.Commit(writeBuffer, totalSize, false); @@ -584,7 +586,7 @@ void SendCounterPacket::SendCounterDirectoryPacket(const ICounterDirectory& coun std::string errorMessage; if (!CreateDeviceRecord(device, deviceRecord, errorMessage)) { - CancelOperationAndThrow(errorMessage); + CancelOperationAndThrow(errorMessage); } // Update the total size in words of the device records @@ -619,7 +621,7 @@ void SendCounterPacket::SendCounterDirectoryPacket(const ICounterDirectory& coun std::string errorMessage; if (!CreateCounterSetRecord(counterSet, counterSetRecord, errorMessage)) { - CancelOperationAndThrow(errorMessage); + CancelOperationAndThrow(errorMessage); } // Update the total size in words of the counter set records @@ -654,7 +656,7 @@ void SendCounterPacket::SendCounterDirectoryPacket(const ICounterDirectory& coun std::string errorMessage; if (!CreateCategoryRecord(category, counterDirectory.GetCounters(), categoryRecord, errorMessage)) { - CancelOperationAndThrow(errorMessage); + CancelOperationAndThrow(errorMessage); } // Update the total size in words of the category records @@ -807,7 +809,7 @@ void SendCounterPacket::SendCounterDirectoryPacket(const ICounterDirectory& coun if (writeBuffer == nullptr || reserved < totalSize) { - CancelOperationAndThrow( + CancelOperationAndThrow( writeBuffer, fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize)); } @@ -844,7 +846,7 @@ void SendCounterPacket::SendPeriodicCounterCapturePacket(uint64_t timestamp, con if (writeBuffer == nullptr || reserved < totalSize) { - CancelOperationAndThrow( + CancelOperationAndThrow( writeBuffer, fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize)); } @@ -893,7 +895,7 @@ void SendCounterPacket::SendPeriodicCounterSelectionPacket(uint32_t capturePerio if (writeBuffer == nullptr || reserved < totalSize) { - CancelOperationAndThrow( + CancelOperationAndThrow( writeBuffer, fmt::format("No space left in buffer. Unable to reserve ({}) bytes.", totalSize)); } -- cgit v1.2.1