Euphoria Ticket #883: Better subscript errors

Subscript errors tell us the value of the bad subscript and the line, but for complex lines, it can still be difficult to pin down the offending subscript.

Ticket derived from forum post:

ChrisB said...

This

if category_list[j][1] = data[i][PROD_CATEGORY][1] then

is producing this error

subscript value 1 is out of bounds, reading from a sequence of length 0

Could I request that the error has a bit more detail, like which variable is producing the error, or even just which side of the equality, or both, is at fault?

Cursory exam of ex.err - both sides seem to have a length> 0

I know I can write some debugging code, but its just a bit of a pain.

Details

Type: Feature Request Severity: Normal Category: Error Reporting
Assigned To: mattlewis Status: Fixed Reported Release:
Fixed in SVN #: View VCS: none Milestone: 4.1.0

1. Comment by mattlewis Jan 08, 2014

See: hg:euphoria/rev/88026931af32

changeset: 6181:88026931af32 parent: 6179:55645520ef24 user: Matt Lewis date: Wed Jan 08 14:47:51 2014 -0500 files: docs/release/4.1.0.txt source/be_rterror.c source/execute.e description:

  • fixes ticket 883 improved subscripting / slicing error messages

2. Comment by mattlewis Jan 08, 2014

See: hg:euphoria/rev/78a6bd2c2e55

changeset: 6182:78a6bd2c2e55 tag: tip user: Matt Lewis date: Wed Jan 08 15:18:59 2014 -0500 files: tests/t_c_slice_past_end_double.d/control.err description:

  • ticket 883: update test with new error message

Search



Quick Links

User menu

Not signed in.

Misc Menu