IVGCVSW-7676 Audit the use of ARMNN_ASSERT

 * Replace most ARMNN_ASSERT's from tflite parser
 * Replace most ARMNN_ASSERT's from onnx parser
 * Replace some ARMNN_ASSERT's from tflite delegate
 * Replace some ARMNN_ASSERT;s from include files

Signed-off-by: Ryan OShea <ryan.oshea3@arm.com>
Change-Id: Ie052e0180060203f28f64ebf54acad298f431caf
diff --git a/delegate/common/src/DelegateUtils.hpp b/delegate/common/src/DelegateUtils.hpp
index 418cad3..a74ed8b 100644
--- a/delegate/common/src/DelegateUtils.hpp
+++ b/delegate/common/src/DelegateUtils.hpp
@@ -109,8 +109,11 @@
 {
     int numDims = armnn::numeric_cast<int>(numDimensions);
     int wrappedIndex = index < 0 ? numDims + index : index;
-    ARMNN_ASSERT(wrappedIndex >= 0);
-    ARMNN_ASSERT(wrappedIndex < numDims);
+
+    if (wrappedIndex < 0 || wrappedIndex >= numDims)
+    {
+        throw armnn::ParseException("Unable to compute wrapped index");
+    }
 
     return static_cast<unsigned int>(wrappedIndex);
 };