Personally I think giving a default result is even better than raising any sort of error in a game. A game you want to be using as many clock cycles as possible for the game play and not coding error handling on every event.

So for a list, if an index is selected that doesn't exist return the first/last item instead.

This allows the developer just to develop their code and never worry about impossible results.