From efd41b35acaae88f49a2f9167bf76cbbede1a950 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Wed, 26 Jan 2022 02:26:19 +0200
Subject: [PATCH] OPEN-358 Readable error

---
 indra/llcommon/llalignedarray.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/indra/llcommon/llalignedarray.h b/indra/llcommon/llalignedarray.h
index b68e9e0f82d..5f52bc0b158 100644
--- a/indra/llcommon/llalignedarray.h
+++ b/indra/llcommon/llalignedarray.h
@@ -116,14 +116,20 @@ void LLAlignedArray<T, alignment>::resize(U32 size)
 template <class T, U32 alignment>
 T& LLAlignedArray<T, alignment>::operator[](int idx)
 {
-	llassert(idx < mElementCount);
+	if(idx >= mElementCount)
+    {
+        LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL;
+    }
 	return mArray[idx];
 }
 
 template <class T, U32 alignment>
 const T& LLAlignedArray<T, alignment>::operator[](int idx) const
 {
-	llassert(idx < mElementCount);
+    if (idx >= mElementCount)
+    {
+        LL_ERRS() << "Out of bounds LLAlignedArray, requested: " << (S32)idx << " size: " << mElementCount << LL_ENDL;
+    }
 	return mArray[idx];
 }
 
-- 
GitLab