12703 - OutOfBoundsException exceptions should have details

Let’s see whether this thread helps.
First reported in 2010 and got attention from Geoff in 2018 :slight_smile:

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.

3 Likes

In my plugin, it’s a define:

#define CheckOutOfBoundsException(var, min, max, varname, methodname) ...

so we pass the variable, minimum and maximum and also variable and method names.
It would be very helpful, if Xojo could internally pass variable value and ubound of array.