IVGCVSW-7855 removed ASSERTs from shim code

Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Change-Id: I8b34e74800ebdb43e1b3f996eacd6c3360a331eb
diff --git a/shim/sl/canonical/Converter.cpp b/shim/sl/canonical/Converter.cpp
index a00a0af..4ef29a1 100644
--- a/shim/sl/canonical/Converter.cpp
+++ b/shim/sl/canonical/Converter.cpp
@@ -5,6 +5,7 @@
 
 #include "Converter.hpp"
 #include <half/half.hpp>
+#include <armnn/Exceptions.hpp>
 #include <armnnUtils/TensorUtils.hpp>
 
 namespace armnn_driver
@@ -890,7 +891,11 @@
         if (isDynamicTensor)
         {
             // Infer the output shapes of concat if outputs are type 1 dynamic
-            ARMNN_ASSERT(layer->GetOutputSlot(0).IsTensorInfoSet());
+            if (!layer->GetOutputSlot(0).IsTensorInfoSet())
+            {
+                throw armnn::Exception(
+                    "tensor info is not set on output slot, cannot process dynamic tensor after input reshape");
+            }
             if (!ValidateConcatOutputShape(inputShapes,
                                            layer->GetOutputSlot(0).GetTensorInfo().GetShape(),
                                            concatDim))
@@ -4534,8 +4539,11 @@
     }
 
     armnn::IConnectableLayer* layer = data.m_Network->AddActivationLayer(desc);
+    if (layer == nullptr)
+    {
+        throw armnn::NullPointerException("failed to add Activation Layer to network");
+    }
     layer->SetBackendId(setBackend);
-    ARMNN_ASSERT(layer != nullptr);
     input.Connect(layer->GetInputSlot(0));
 
     return SetupAndTrackLayerOutputSlot(operation, 0, *layer, model, data, nullptr, validateFunc);