Let’s see whether this thread helps.
First reported in 2010 and got attention from Geoff in 2018
I even volunteered to help change the framework. Anyway in our plugin the function to raise an OutOfBoundsException is overloaded and passes details including the index used and the maximum given. This could be done in Xojo itself, especially in code generated by array access.
While the C++ framework may need hundreds of places needing changes, for the Xojo code calling array functions, it may only be a hand full.