Bogus error message/location from mistaken catch clause

Bug #1192007 reported by Chris Hillery
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
New
High
Nicolae Brinza

Bug Description

declare variable $local:error as xs:QName := xs:QName("err:error");

declare function local:foo() as item()*
{
 error($local:error)
};

try {
   local:foo()
}
catch $local:error {
   "foo"
}

The error is "catch $local:error", which should be "catch local:error". However, the error message is

</tmp/foo.xq>:6,2: static error [err:XPST0003]: invalid expression: syntax error, missing semicolon ";" after declaration.

where line 6 is the end of the "declare function". So the location is wrong, and the error message actually reports something that is not true (there IS a semicolon after the declaration).

Chris Hillery (ceejatec)
Changed in zorba:
assignee: nobody → Nicolae Brinza (nbrinza)
milestone: none → 3.0
importance: Undecided → High
Chris Hillery (ceejatec)
Changed in zorba:
milestone: 3.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.