Revert "[Tizen] Remove throwing exception"
authortscholb <scholb.kim@samsung.com>
Mon, 1 Nov 2021 07:15:26 +0000 (16:15 +0900)
committertscholb <scholb.kim@samsung.com>
Mon, 1 Nov 2021 07:15:26 +0000 (16:15 +0900)
This reverts commit cc5832843a63cfe3a6b52ee57f73a67c095a62e4.

dali/public-api/common/dali-vector.h

index 4d90e2e..2fea460 100644 (file)
@@ -549,8 +549,12 @@ public: // API
   const ItemType& operator[](SizeType index) const
   {
     DALI_ASSERT_VECTOR(VectorBase::mData && "Vector is empty");
-    assert(index < VectorBase::Count());
-
+    DALI_ASSERT_VECTOR(index < VectorBase::Count() && "Index out of bounds");
+    if(index >= VectorBase::Count())
+    {
+      // Assert to debug
+      assert(0);
+    }
     ItemType* address = reinterpret_cast<ItemType*>(VectorBase::mData);
     address += index;
     return *address;