Quantcast

Misleading error message

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Misleading error message

Jonathan Rowell

Hi,


now I know that what I was trying to do is wrong, but the error message is totally misleading. No line number is reported in eXide and in Test Suite a totally misleading line and column number is reported, which confuses the issue no end.


The code to cause the error is simply :-


xquery version "3.0";

declare namespace jr = "http://www.JonathanTest.fr/tests";

let $list := (<jr:element/>,<jr:another-element/>)
return
    if ($list[node-name(.)='jr:element']) then
        true()
    else
        false()

and the error message is "exerr:ERROR Type error: cannot compare QName to xs:string". It also fails if there is one element in the $list but not when it is empty.


I actually create a list of elements dynamically, one at a time, and want to check that if the next one is only allowed once the raise an error. In practice the elements have different content.


Jonathan





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...