Merge lp:~zorba-coders/zorba/bug-867209 into lp:zorba

Proposed by Matthias Brantner on 2012-10-23
Status: Merged
Approved by: Till Westmann on 2012-10-23
Approved revision: 11097
Merged at revision: 11107
Proposed branch: lp:~zorba-coders/zorba/bug-867209
Merge into: lp:zorba
Diff against target: 79 lines (+14/-5)
3 files modified
src/compiler/translator/translator.cpp (+2/-3)
src/diagnostics/diagnostic_en.xml (+9/-1)
src/diagnostics/pregenerated/dict_en.cpp (+3/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-867209
Reviewer Review Type Date Requested Status
Till Westmann 2012-10-23 Approve on 2012-10-23
Matthias Brantner Approve on 2012-10-23
Review via email: mp+131074@code.launchpad.net

Commit message

fix for bug 867209: improved error message for XQST0045

Description of the change

fix for bug 867209: improved error message for XQST0045

To post a comment you must log in.
review: Approve
Till Westmann (tillw) wrote :

works for me :)

review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-867209-2012-10-23T19-19-42.43Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/compiler/translator/translator.cpp'
2--- src/compiler/translator/translator.cpp 2012-10-22 15:10:23 +0000
3+++ src/compiler/translator/translator.cpp 2012-10-23 19:12:19 +0000
4@@ -3478,7 +3478,7 @@
5 ns == XQUERY_MATH_FN_NS)
6 {
7 RAISE_ERROR(err::XQST0045, func_decl->get_location(),
8- ERROR_PARAMS(qnameItem->getLocalName()));
9+ ERROR_PARAMS(qnameItem->getLocalName(), ZED(FUNCTION), ns));
10 }
11
12 if (! theModuleNamespace.empty() && ns != theModuleNamespace)
13@@ -4121,8 +4121,7 @@
14 if (AnnotationInternal::lookup(lExpandedQName) == AnnotationInternal::zann_end)
15 {
16 RAISE_ERROR(err::XQST0045, loc,
17- ERROR_PARAMS( "%" + ("\"" + lExpandedQName->getNamespace() + "\""
18- + ":" + lExpandedQName->getLocalName())));
19+ ERROR_PARAMS(lExpandedQName->getLocalName(), ZED(ANNOTATION), annotNS));
20 }
21
22 //recognised = true;
23
24=== modified file 'src/diagnostics/diagnostic_en.xml'
25--- src/diagnostics/diagnostic_en.xml 2012-10-09 15:28:45 +0000
26+++ src/diagnostics/diagnostic_en.xml 2012-10-23 19:12:19 +0000
27@@ -377,7 +377,7 @@
28 <code>http://www.w3.org/2001/XMLSchema-instance</code>,
29 <code>http://www.w3.org/2005/xpath-functions</code>.
30 </comment>
31- <value>"$1": invalid function or annotation namespace</value>
32+ <value>"$1": $2 declared in reserved namespace${ 3}</value>
33 </diagnostic>
34
35 <diagnostic code="XQST0046">
36@@ -4009,6 +4009,14 @@
37 <value>unexpected extra content at the end of the document (consider using the jsoniq-multiple-top-level-items option)</value>
38 </entry>
39
40+ <entry key="FUNCTION">
41+ <value>function</value>
42+ </entry>
43+
44+ <entry key="ANNOTATION">
45+ <value>annotation</value>
46+ </entry>
47+
48 </subvalues>
49
50 </diagnostic-list>
51
52=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
53--- src/diagnostics/pregenerated/dict_en.cpp 2012-10-09 15:28:45 +0000
54+++ src/diagnostics/pregenerated/dict_en.cpp 2012-10-23 19:12:19 +0000
55@@ -216,7 +216,7 @@
56 { "XQST0038", "multiple default collation declarations" },
57 { "XQST0039", "\"$1\": duplicate parameter name" },
58 { "XQST0040", "\"$1\": non-distinct expanded attribute QName" },
59- { "XQST0045", "\"$1\": invalid function or annotation namespace" },
60+ { "XQST0045", "\"$1\": $2 declared in reserved namespace${ 3}" },
61 { "XQST0046", "${\"1\": }invalid URI literal${: 2}" },
62 { "XQST0047", "\"$1\": duplicate target namespace" },
63 { "XQST0048", "\"$1\": not in library namespace" },
64@@ -507,6 +507,7 @@
65 #if !defined(ZORBA_NO_FULL_TEXT)
66 { "ZXQP8403", "thesaurus data error${: 1}" },
67 #endif
68+ { "~ANNOTATION", "annotation" },
69 { "~AllMatchesHasExcludes", "AllMatches contains StringExclude" },
70 { "~AlreadySpecified", "already specified" },
71 { "~ArithOpNotDefinedBetween_23", "arithmetic operation not defined between types \"$2\" and \"$3\"" },
72@@ -583,6 +584,7 @@
73 { "~FTST0009_BadStopWordsLang", "for current stop words" },
74 { "~FTST0009_BadThesaurusLang", "for given thesaurus" },
75 { "~FTST0009_BadTokenizerLang", "for current tokenizer" },
76+ { "~FUNCTION", "function" },
77 { "~FileNotFoundOrReadable", "file not found or readable" },
78 { "~FnNilledArgNotNode", "fn:nilled() argument not a node" },
79 { "~FnOnlyInXQueryVersion_3", "function only available in XQuery $3" },

Subscribers

People subscribed via source and target branches