summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-01-26 02:26:19 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-01-26 02:26:19 +0200
commitefd41b35acaae88f49a2f9167bf76cbbede1a950 (patch)
tree7670857cbd6fb0418360f56d6b57dac7180d10d3 /indra/llcommon
parent1f542bf5427787577a564cd716b005c19500d54a (diff)
OPEN-358 Readable error
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llalignedarray.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llcommon/llalignedarray.h b/indra/llcommon/llalignedarray.h
index b68e9e0f82..5f52bc0b15 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];
}