IVGCVSW-4163 Enhance the error handling in the ReadPacket function

* Introduced armnn::SocketConnectionException with fields error no and socket info.

Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: Ideb85b00771864e332226635aeff3096fbea8e5f
diff --git a/src/profiling/ProfilingService.cpp b/src/profiling/ProfilingService.cpp
index 0c33ca0..f111de1 100644
--- a/src/profiling/ProfilingService.cpp
+++ b/src/profiling/ProfilingService.cpp
@@ -7,6 +7,7 @@
 
 #include <armnn/BackendId.hpp>
 #include <armnn/Logging.hpp>
+#include <common/include/SocketConnectionException.hpp>
 
 #include <boost/format.hpp>
 
@@ -128,6 +129,11 @@
             ARMNN_LOG(warning) << "An error has occurred when creating the profiling connection: "
                                        << e.what();
         }
+        catch (const armnnProfiling::SocketConnectionException& e)
+        {
+            ARMNN_LOG(warning) << "An error has occurred when creating the profiling connection ["
+                                       << e.what() << "] on socket [" << e.GetSocketFd() << "].";
+        }
 
         // Move to the next state
         m_StateMachine.TransitionToState(m_ProfilingConnection