zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #10905
[Bug 854506] Re: type errors cause ugly error msgs
** Changed in: zorba
Milestone: None => 2.7
** Changed in: zorba
Status: In Progress => Fix Committed
--
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/854506
Title:
type errors cause ugly error msgs
Status in Zorba - The XQuery Processor:
Fix Committed
Bug description:
A query like this
declare function local:foo() as empty-sequence()
{
<foo />
};
local:foo();
causes the following error msg because of a type error:
<?xml version="1.0" encoding="UTF-8"?>
</Users/wcandillon/tmp/test.xq>:3,3: type error [err:XPTY0004]: Cannot
treat [NodeXQType elementNode nametest=[uri: , local: foo]
content=[XQType ANY_TYPE_KIND*]] as [XQType NONE_KIND] when returning
the result of the function local:foo().; raised at
/Users/wcandillon/28msec/zorba/src/runtime/core/sequencetypes.cpp:557
=================================================
local:foo#0 <http://www.w3.org/2005/xquery-local-functions>
/Users/wcandillon/tmp/test.xq at line 6 column 1
This is very ugly und not understandable for someone who is not
involved in the zorba internals. We need an error msg like this:
Stopped at line 1, column 17: [XPTY0004] Can't promote type xs:string
to empty-sequence(): "abc".
To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/854506/+subscriptions
References