Error Trapping

I’m getting confused with when Errors are trapped. I created a feedback report <https://xojo.com/issue/52112> about how an error is not trapped when you try to write to a non-existent RowTag in a WebPopupMenu.

  ' This line should throw an OutOfBoundsException as there is only 1 row in the menu.
  cboTest.RowTag (101) = "This is tag on non existing line 101"

I was told this is by design. Why? Surely I want to know if I’m trying to write to a non-existent row? And the IDE will catch the error if I have the “Break on Exceptions” so an error is being raised internally but doesn’t go to the error trap.

I seem to be having a similar problem with the WebUploadedFile. If I try to use the WebUploadedFile.Save method using a filename that already exists, the IDE will break with an IOException but the exception is NOT trapped by a try/catch. Is this by design as well? I want to trap any IOException raised by the save.

Some clarification would be appreciated. What do others think?

So, why has it been designed that OutofBoundsExceptions are being caught by the control and not thrown to the application?