Project

Profile

Help

Bug #4535

closed

Misleading error message when array index out of bound

Added by Norman Tovey-Walsh almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2020-05-01
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, 9.9
Fix Committed on Branch:
10, 9.9
Fixed in Maintenance Release:
Platforms:

Description

I'm doing some work with arrays. At one point, I got this message

Error at char 0 in expression in xsl:variable/@select on line 336 column 64 of tablecals.xsl:
  FOAY0001  Requested 1, actual size 1

That puzzled me. It took me a long time to add an xsl:message and work out that I was actually asking for item 2 in this array of length 1.

I tried to reproduce this with a very simple test and got a different message

Error FOAY0001 while evaluating xsl:message at line 14 of file:/tmp/out.xsl: Array index (2) out of range (1 to 1)

At a guess, I'd say whatever part of the code generates the former message is reporting the 0-based Java index and not the 1-based XSLT index.

In any event, if you need code to reproduce this, I'll keep a snapshot around.

Please register to edit this issue

Also available in: Atom PDF