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

Proposed by Paul J. Lucas
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/bug-1044260
Merge into: lp:zorba
Diff against target: 1579 lines (+688/-142)
27 files modified
include/zorba/internal/diagnostic.h (+6/-5)
include/zorba/pregenerated/diagnostic_list.h (+2/-0)
modules/org/jsoniq/www/pregenerated/errors.xq (+8/-0)
src/compiler/translator/translator.cpp (+5/-5)
src/context/static_context.cpp (+1/-1)
src/diagnostics/CMakeLists.txt (+16/-5)
src/diagnostics/diagnostic.h (+31/-5)
src/diagnostics/diagnostic_en.xml (+102/-33)
src/diagnostics/dict.h (+3/-1)
src/diagnostics/dict_zed_keys_h.xq (+55/-0)
src/diagnostics/pregenerated/diagnostic_list.cpp (+3/-0)
src/diagnostics/pregenerated/dict_en.cpp (+45/-37)
src/diagnostics/pregenerated/dict_zed_keys.h (+338/-0)
src/runtime/core/apply_updates.cpp (+15/-20)
src/runtime/core/fncall_iterator.cpp (+1/-1)
src/runtime/core/sequencetypes.cpp (+7/-8)
src/runtime/function_item/dynamic_fncall_iterator.cpp (+3/-3)
src/runtime/json/jsoniq_functions_impl.cpp (+2/-2)
src/runtime/numerics/numerics_impl.cpp (+1/-1)
src/store/naive/node_items.cpp (+2/-1)
src/store/naive/pul_primitives.cpp (+35/-7)
src/util/error_util.cpp (+2/-2)
test/rbkt/ExpQueryResults/zorba/index/auctions2u.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_06.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_10.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/jsoniq/serializer-JNSE0022.xml.res (+1/-1)
test/rbkt/Queries/zorba/index/auctions2u.xq (+1/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1044260
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Needs Fixing
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+125297@code.launchpad.net

This proposal has been superseded by a proposal from 2012-11-17.

Commit message

ZED keys are now compile-time checked for existence.

Description of the change

ZED keys are now compile-time checked for existence.

To post a comment you must log in.
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/bug-1044260 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug-1044260-2012-09-19T18-38-42.91Z is finished. The
  final status was:

  37 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~zorba-coders/zorba/bug-1044260 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job bug-1044260-2012-09-20T17-56-04.083Z is finished. The
  final status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

Looks good.

I added Markos as a reviewer because he was reviewer for the proposal regarding bug 'Bug #1052283: XUDY0021_AppliedAt used without definition' which has been merged into the proposed branch.

review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-1044260-2012-09-20T21-38-55.839Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 2 Approve, 2 Pending.

Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

I think more error codes must be listed in the catch clause in apply_updates.cpp. For example, XUDY0024, and a bunch of ZDDY codes related to collections and indexes (search for XUDY and ZDDY in src/store and see which of these errors are thrown during PUL apply).

review: Needs Fixing
Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

It looks like: XUDY0014, XUDY0015, XUDY0016, XUDY0017, XUDY0023, XUDY0031, ZDDY0016, ZDDY0027.

Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

No, the erros you list here are not thrown during PUL apply. My comment was actually meant for Matthias. I think it will be easier for him to find the correct list of errors.

lp:~zorba-coders/zorba/bug-1044260 updated
11061. By Paul J. Lucas

Merge from trunk.

11062. By Paul J. Lucas

Merge from trunk.

11063. By Paul J. Lucas

Merge from trunk.

11064. By Paul J. Lucas

Merge from trunk.

11065. By Paul J. Lucas

Merge from trunk.

11066. By Paul J. Lucas

Merge from trunk.

11067. By Paul J. Lucas

Merge from trunk.

11068. By Matthias Brantner

fix the build

11069. By Paul J. Lucas

Merge from trunk.

11070. By Paul J. Lucas

Merge from trunk.

11071. By Paul J. Lucas

1. Added line_end and column_end to a variant of make_location.
2. Added make_location(XQueryException const&).

11072. By Paul J. Lucas

Fixed comment.

11073. By Paul J. Lucas

Added error codes to "catch" clause.

11074. By Paul J. Lucas

Merge from trunk.

11075. By Markos Zaharioudakis

1. added some error codes to be reprocessed inside the catch statement in apply_updates.cpp. 2. Added location to errors thrown from pul_primitives.cpp

11076. By Paul J. Lucas

Merge from trunk.

11077. By Paul J. Lucas

Now keeping the original error code.

11078. By Paul J. Lucas

Added base_name().

11079. By Markos Zaharioudakis

fixed failing test

11080. By Paul J. Lucas

Now only putting file name in error.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'include/zorba/internal/diagnostic.h'
--- include/zorba/internal/diagnostic.h 2012-09-19 21:16:15 +0000
+++ include/zorba/internal/diagnostic.h 2012-11-17 18:50:26 +0000
@@ -70,15 +70,16 @@
70 /**70 /**
71 * Constructs a %location.71 * Constructs a %location.
72 *72 *
73 * @param file The name of the file where the error occurred.73 * @param file The name of the file where the expression causing the error
74 * @param line The line number of the file where the expression that raises74 * occurred.
75 * the error begins.75 * @param line The line number of the file where the expression causing the
76 * error begins.
76 * @param column The column number, if any, of the file where the expression77 * @param column The column number, if any, of the file where the expression
77 * that raises the error begins.78 * causing the error begins.
78 * @param line_end The end line number, if any, of the file where the79 * @param line_end The end line number, if any, of the file where the
79 * expression causing the error ends.80 * expression causing the error ends.
80 * @param column_end The end column number, if any, of the file where the81 * @param column_end The end column number, if any, of the file where the
81 * xpression causing the error ends.82 * expression causing the error ends.
82 */83 */
83 location( char const *file, line_type line, column_type column = 0,84 location( char const *file, line_type line, column_type column = 0,
84 line_type line_end = 0, column_type column_end = 0 ) :85 line_type line_end = 0, column_type column_end = 0 ) :
8586
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h 2012-11-08 05:38:30 +0000
+++ include/zorba/pregenerated/diagnostic_list.h 2012-11-17 18:50:26 +0000
@@ -847,6 +847,8 @@
847847
848extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0012;848extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0012;
849849
850extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0013;
851
850extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0014;852extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0014;
851853
852extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0022;854extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0022;
853855
=== modified file 'modules/org/jsoniq/www/pregenerated/errors.xq'
--- modules/org/jsoniq/www/pregenerated/errors.xq 2012-10-08 12:09:36 +0000
+++ modules/org/jsoniq/www/pregenerated/errors.xq 2012-11-17 18:50:26 +0000
@@ -100,6 +100,14 @@
100declare variable $jerr:JNSE0012 as xs:QName := fn:QName($jerr:NS, "jerr:JNSE0012");100declare variable $jerr:JNSE0012 as xs:QName := fn:QName($jerr:NS, "jerr:JNSE0012");
101101
102(:~102(:~
103 :It is a dynamic error to serialize an atomic value not
104 : supported by JSON or a node with the JSON output method and with
105 : the jsoniq-serialization-extensions serialization parameter
106 : set to false.
107:)
108declare variable $jerr:JNSE0013 as xs:QName := fn:QName($jerr:NS, "jerr:JNSE0013");
109
110(:~
103 :It is a dynamic error to serialize a function or a node with the111 :It is a dynamic error to serialize a function or a node with the
104 : JSON output method.112 : JSON output method.
105:)113:)
106114
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp 2012-11-08 05:38:30 +0000
+++ src/compiler/translator/translator.cpp 2012-11-17 18:50:26 +0000
@@ -6328,7 +6328,7 @@
6328 if (v.has_allowing_empty())6328 if (v.has_allowing_empty())
6329 {6329 {
6330 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)6330 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)
6331 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_OuterForClause11)));6331 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_OuterForClause30)));
63326332
6333 theFlworClausesStack.push_back(NULL);6333 theFlworClausesStack.push_back(NULL);
6334 }6334 }
@@ -6547,7 +6547,7 @@
6547 TRACE_VISIT();6547 TRACE_VISIT();
65486548
6549 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)6549 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)
6550 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_WindowClause11)));6550 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_WindowClause30)));
65516551
6552 return no_state;6552 return no_state;
6553}6553}
@@ -7257,7 +7257,7 @@
7257 TRACE_VISIT ();7257 TRACE_VISIT ();
72587258
7259 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)7259 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)
7260 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_CountClause11)));7260 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_CountClause30)));
72617261
7262 return no_state;7262 return no_state;
7263}7263}
@@ -7321,7 +7321,7 @@
73217321
7322 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)7322 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)
7323 {7323 {
7324 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_SwitchExpr11)));7324 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_SwitchExpr30)));
7325 }7325 }
73267326
7327 v.get_switch_expr()->accept(*this);7327 v.get_switch_expr()->accept(*this);
@@ -7731,7 +7731,7 @@
77317731
7732 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)7732 if (theSctx->xquery_version() < StaticContextConsts::xquery_version_3_0)
7733 {7733 {
7734 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_TryCatchExpr11)));7734 RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(XPST0003_TryCatchExpr30)));
7735 }7735 }
77367736
7737 theTryStack.push_back(&v);7737 theTryStack.push_back(&v);
77387738
=== modified file 'src/context/static_context.cpp'
--- src/context/static_context.cpp 2012-11-12 17:12:41 +0000
+++ src/context/static_context.cpp 2012-11-17 18:50:26 +0000
@@ -284,7 +284,7 @@
284 if (!module)284 if (!module)
285 {285 {
286 throw ZORBA_EXCEPTION(zerr::ZCSE0013_UNABLE_TO_LOAD_QUERY,286 throw ZORBA_EXCEPTION(zerr::ZCSE0013_UNABLE_TO_LOAD_QUERY,
287 ERROR_PARAMS(ZED(NoExternalModuleFromDLL), lURI));287 ERROR_PARAMS(ZED(NoExternalModuleFromDLL_2), lURI));
288 }288 }
289 }289 }
290 else290 else
291291
=== modified file 'src/diagnostics/CMakeLists.txt'
--- src/diagnostics/CMakeLists.txt 2012-09-19 21:16:15 +0000
+++ src/diagnostics/CMakeLists.txt 2012-11-17 18:50:26 +0000
@@ -25,6 +25,7 @@
25 xquery_stack_trace.cpp25 xquery_stack_trace.cpp
26 user_error.cpp26 user_error.cpp
27 user_exception.cpp 27 user_exception.cpp
28 dict_zed_keys.h
28 )29 )
2930
30ZORBA_DIAGNOSTIC_GENERATOR(31ZORBA_DIAGNOSTIC_GENERATOR(
@@ -32,21 +33,24 @@
32 "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml"33 "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml"
33 "diagnostic_en.xml"34 "diagnostic_en.xml"
34 ""35 ""
35 "${CMAKE_BINARY_DIR}/include/zorba/diagnostic_list.h")36 "${CMAKE_BINARY_DIR}/include/zorba/diagnostic_list.h"
37)
3638
37ZORBA_DIAGNOSTIC_GENERATOR(39ZORBA_DIAGNOSTIC_GENERATOR(
38 "${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_list_cpp.xq"40 "${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_list_cpp.xq"
39 "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml"41 "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml"
40 "diagnostic_en.xml"42 "diagnostic_en.xml"
41 "${CMAKE_BINARY_DIR}/include/zorba/diagnostic_list.h"43 "${CMAKE_BINARY_DIR}/include/zorba/diagnostic_list.h"
42 "${CMAKE_BINARY_DIR}/src/diagnostics/diagnostic_list.cpp")44 "${CMAKE_BINARY_DIR}/src/diagnostics/diagnostic_list.cpp"
45)
4346
44ZORBA_DIAGNOSTIC_GENERATOR(47ZORBA_DIAGNOSTIC_GENERATOR(
45 "${CMAKE_SOURCE_DIR}/src/diagnostics/dict_XX_cpp.xq"48 "${CMAKE_SOURCE_DIR}/src/diagnostics/dict_XX_cpp.xq"
46 "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml"49 "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml"
47 "diagnostic_en.xml"50 "diagnostic_en.xml"
48 ""51 ""
49 "${CMAKE_BINARY_DIR}/src/diagnostics/dict_en.cpp")52 "${CMAKE_BINARY_DIR}/src/diagnostics/dict_en.cpp"
53)
5054
51ZORBA_DIAGNOSTIC_GENERATOR(55ZORBA_DIAGNOSTIC_GENERATOR(
52 "${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_list_xq.xq"56 "${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_list_xq.xq"
@@ -56,6 +60,14 @@
56 "${CMAKE_BINARY_DIR}/modules/w3c/xqt-errors.xq"60 "${CMAKE_BINARY_DIR}/modules/w3c/xqt-errors.xq"
57)61)
5862
63ZORBA_DIAGNOSTIC_GENERATOR(
64 "${CMAKE_SOURCE_DIR}/src/diagnostics/dict_zed_keys_h.xq"
65 "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml"
66 "diagnostic_en.xml"
67 ""
68 "${CMAKE_BINARY_DIR}/src/diagnostics/dict_zed_keys.h"
69)
70
59IF(ZORBA_WITH_JSON)71IF(ZORBA_WITH_JSON)
60ZORBA_DIAGNOSTIC_GENERATOR(72ZORBA_DIAGNOSTIC_GENERATOR(
61 "${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_list_xq.xq"73 "${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_list_xq.xq"
@@ -79,8 +91,7 @@
79 "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml;ns:=zwarn"91 "input=${CMAKE_SOURCE_DIR}/src/diagnostics/diagnostic_en.xml;ns:=zwarn"
80 "diagnostic_en.xml"92 "diagnostic_en.xml"
81 ""93 ""
82 "${CMAKE_BINARY_DIR}/modules/com/zorba-xquery/www/modules/warnings.xq"94 "${CMAKE_BINARY_DIR}/modules/com/zorba-xquery/www/modules/warnings.xq")
83)
8495
85SET(DIAG_MODULES96SET(DIAG_MODULES
86 ${CMAKE_BINARY_DIR}/modules/com/zorba-xquery/www/modules/warnings.xq97 ${CMAKE_BINARY_DIR}/modules/com/zorba-xquery/www/modules/warnings.xq
8798
=== modified file 'src/diagnostics/diagnostic.h'
--- src/diagnostics/diagnostic.h 2012-09-19 21:16:15 +0000
+++ src/diagnostics/diagnostic.h 2012-11-17 18:50:26 +0000
@@ -19,6 +19,7 @@
19#define ZORBA_DIAGNOSTIC_H19#define ZORBA_DIAGNOSTIC_H
2020
21#include <zorba/diagnostic.h>21#include <zorba/diagnostic.h>
22#include <zorba/xquery_exception.h>
2223
23#include "compiler/parser/query_loc.h"24#include "compiler/parser/query_loc.h"
24#include "store/api/item.h"25#include "store/api/item.h"
@@ -71,16 +72,41 @@
71/**72/**
72 * Makes a location.73 * Makes a location.
73 *74 *
74 * @param file The name of the file where the error occurred.75 * @param file The name of the file where the expression causing the error
75 * @param line The line number of the file where the error occurred.
76 * @param column The column number, if any, of the file where the error
77 * occurred.76 * occurred.
77 * @param line The line number of the file where the expression causing the
78 * error begins.
79 * @param column The column number, if any, of the file where the expression
80 * causing the error begins.
81 * @param line_end The end line number, if any, of the file where the
82 * expression causing the error ends.
83 * @param column_end The end column number, if any, of the file where the
84 * expression causing the error ends.
78 * @return Returns a new location.85 * @return Returns a new location.
79 */86 */
80inline internal::diagnostic::location87inline internal::diagnostic::location
81make_location( char const *file, internal::diagnostic::location::line_type line,88make_location( char const *file, internal::diagnostic::location::line_type line,
82 internal::diagnostic::location::column_type column = 0 ) {89 internal::diagnostic::location::column_type column = 0,
83 return internal::diagnostic::location( file, line, column );90 internal::diagnostic::location::line_type line_end = 0,
91 internal::diagnostic::location::column_type column_end = 0 ) {
92 return internal::diagnostic::location(
93 file, line, column, line_end, column_end
94 );
95}
96
97/**
98 * Makes a location.
99 *
100 * @param e The XQueryException to copy the location from.
101 * @return Returns a new location.
102 */
103inline internal::diagnostic::location
104make_location( XQueryException const &e ) {
105 return internal::diagnostic::location(
106 e.source_uri(),
107 e.source_line(), e.source_column(),
108 e.source_line_end(), e.source_column_end()
109 );
84}110}
85111
86/**112/**
87113
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2012-11-08 05:38:30 +0000
+++ src/diagnostics/diagnostic_en.xml 2012-11-17 18:50:26 +0000
@@ -14,6 +14,45 @@
14 ! limitations under the License.14 ! limitations under the License.
15 -->15 -->
1616
17<!--
18 ! Please use the following convention for sub-message keys.
19 !
20 ! If a sub-message key has at least one $n number in it (where 'n' is [1-9]),
21 ! append an underscore ('_') followed by all the number(s) used in the value.
22 ! If the last $n is optional, append a lowercase 'o'.
23 !
24 ! For example, given this "throw" in C++ code:
25 !
26 ! throw XQUERY_EXCEPTION(
27 ! err::XPTY0004,
28 ! ERROR_PARAMS(
29 ! ZED( BadType_23o ), *domainType,
30 ! ZED( NoTreatAs_4 ), *declaredType
31 ! ),
32 ! ERROR_LOC( get_loc() )
33 ! );
34 !
35 ! The "bad type" and "no treat as" keys are defined as:
36 !
37 ! <entry key="BadType_23o">
38 ! <value>"$2": invalid type${: 3}</value>
39 ! </entry>
40 !
41 ! <entry key="NoTreatAs_4">
42 ! <value>can not treat as "$4"</value>
43 ! </entry>
44 !
45 ! In the "throw" above, you can tell just by looking at it that all the
46 ! required parameters are given and that each has the correct number/position.
47 !
48 ! ERROR_PARAMS(
49 ! ZED( BadType_23o ), // #1
50 ! *domainType, // #2
51 ! ZED( NoTreatAs_4 ), // #3
52 ! *declaredType // #4
53 ! ),
54 -->
55
17<diagnostic-list lang="en">56<diagnostic-list lang="en">
1857
19 <namespace prefix="err">58 <namespace prefix="err">
@@ -47,27 +86,27 @@
47 <value>"$2": XQuery version must be at least 3.0</value>86 <value>"$2": XQuery version must be at least 3.0</value>
48 </entry>87 </entry>
4988
50 <entry key="OuterForClause11">89 <entry key="OuterForClause30">
51 <value>"outer-for" clause only available in XQuery 3.0 or later</value>90 <value>"outer-for" clause only available in XQuery 3.0 or later</value>
52 </entry>91 </entry>
5392
54 <entry key="WindowClause11">93 <entry key="WindowClause30">
55 <value>"window" clause only available in XQuery 3.0 or later</value>94 <value>"window" clause only available in XQuery 3.0 or later</value>
56 </entry>95 </entry>
5796
58 <entry key="CountClause11">97 <entry key="CountClause30">
59 <value>"count" clause only available in XQuery 3.0 or later</value>98 <value>"count" clause only available in XQuery 3.0 or later</value>
60 </entry>99 </entry>
61100
62 <entry key="SwitchExpr11">101 <entry key="SwitchExpr30">
63 <value>"switch" expressions only available in XQuery 3.0 or later</value>102 <value>"switch" expressions only available in XQuery 3.0 or later</value>
64 </entry>103 </entry>
65104
66 <entry key="TryCatchExpr11">105 <entry key="TryCatchExpr30">
67 <value>"try/catch" expressions only available in XQuery 3.0 or later</value>106 <value>"try/catch" expressions only available in XQuery 3.0 or later</value>
68 </entry>107 </entry>
69108
70 <entry key="Anotations">109 <entry key="Annotations">
71 <value>function and variable annotations only available in XQuery 3.0 or later</value>110 <value>function and variable annotations only available in XQuery 3.0 or later</value>
72 </entry>111 </entry>
73112
@@ -156,32 +195,32 @@
156195
157 <value>$1</value>196 <value>$1</value>
158197
159 <entry key="FuncReturn">198 <entry key="NoReturnTypePromote_234">
160 <value>$2 can not be promoted to return type $3 of function $4()</value>199 <value>$2 can not be promoted to return type $3 of function $4()</value>
161 </entry>200 </entry>
162201
163 <entry key="FuncParam">202 <entry key="NoParamTypePromote_234">
164 <value>$2 can not be promoted to parameter type $3 of function $4()</value>203 <value>$2 can not be promoted to parameter type $3 of function $4()</value>
165 </entry>204 </entry>
166205
167 <entry key="TypePromotion">206 <entry key="NoTypePromote_23">
168 <value>$2 can not be promoted to type $3</value>207 <value>$2 can not be promoted to type $3</value>
169 </entry>208 </entry>
170209
171 <entry key="NoMultiSeqTypePromotion">210 <entry key="NoMultiSeqTypePromotion_2">
172 <value>sequence of more than one item can not be promoted to type $2</value>211 <value>sequence of more than one item can not be promoted to type $2</value>
173 </entry>212 </entry>
174213
175 <entry key="TypeMatch">214 <entry key="NoTreatAs_23">
176 <value>$2 can not be treated as type $3</value>215 <value>$2 can not be treated as type $3</value>
177 </entry>216 </entry>
178217
179 <entry key="FormatNumber_2">218 <entry key="FormatNumber_2">
180 <value>the first parameter to the format-number() function is of type $2, which is not allowed</value>219 <value>first parameter to format-number() function is type $2 that is not allowed</value>
181 </entry>220 </entry>
182221
183 <entry key="JSONIQ_SELECTOR">222 <entry key="JSONIQ_SELECTOR">
184 <value>Cannot atomize and/or cast value of type $2 to a string.</value>223 <value>can not atomize and/or cast value of type $2 to string</value>
185 </entry>224 </entry>
186225
187 <entry key="MultiValuedGroupingKey">226 <entry key="MultiValuedGroupingKey">
@@ -1436,7 +1475,15 @@
1436 [XQuery 1.0 and XPath 2.0 Data Model]. In this case, none of the updates1475 [XQuery 1.0 and XPath 2.0 Data Model]. In this case, none of the updates
1437 in the query are made effective.1476 in the query are made effective.
1438 </comment>1477 </comment>
1439 <value>updates violate constraint</value>1478 <value>$1${ 2}</value>
1479
1480 <entry key="AttributeName">
1481 <value>"$3": attribute with the same name already exists</value>
1482 </entry>
1483
1484 <entry key="AppliedAt">
1485 <value>(applied at $3)</value>
1486 </entry>
1440 </diagnostic>1487 </diagnostic>
14411488
1442 <diagnostic code="XUTY0022">1489 <diagnostic code="XUTY0022">
@@ -1988,11 +2035,11 @@
1988 </diagnostic>2035 </diagnostic>
19892036
1990 <diagnostic code="ZAPI0080" name="CANNOT_RETRIEVE_NODE_REFERENCE">2037 <diagnostic code="ZAPI0080" name="CANNOT_RETRIEVE_NODE_REFERENCE">
1991 <value>can not retrieve node-reference for a node that is not in a collection.</value>2038 <value>can not retrieve node-reference for a node that is not in a collection</value>
1992 </diagnostic>2039 </diagnostic>
1993 2040
1994 <diagnostic code="ZAPI0090" name="CANNOT_VALIDATE_NON_ROOT">2041 <diagnostic code="ZAPI0090" name="CANNOT_VALIDATE_NON_ROOT">
1995 <value>a non root element cannot be validated in place.</value>2042 <value>non root element cannot be validated in place</value>
1996 </diagnostic>2043 </diagnostic>
19972044
1998 <!--////////// Zorba Class Serialization Errors ////////////////////////-->2045 <!--////////// Zorba Class Serialization Errors ////////////////////////-->
@@ -2488,7 +2535,7 @@
2488 </diagnostic>2535 </diagnostic>
24892536
2490 <diagnostic code="ZSTR0066" name="REFERENCED_NODE_NOT_IN_COLLECTION">2537 <diagnostic code="ZSTR0066" name="REFERENCED_NODE_NOT_IN_COLLECTION">
2491 <value>$1: does not reference a node in collection $2.</value>2538 <value>$1: does not reference a node in collection $2</value>
2492 </diagnostic>2539 </diagnostic>
24932540
2494 <!--////////// XQuery Scripting ////////////////////////////////////////-->2541 <!--////////// XQuery Scripting ////////////////////////////////////////-->
@@ -2561,6 +2608,7 @@
2561 <diagnostic code="ZJPE0009" name="ILLEGAL_EMPTY_STRING">2608 <diagnostic code="ZJPE0009" name="ILLEGAL_EMPTY_STRING">
2562 <value>illegal empty string</value>2609 <value>illegal empty string</value>
2563 </diagnostic>2610 </diagnostic>
2611
2564 <diagnostic code="ZJPE0010" name="JSONML_ARRAY_REQUIRES_BRACKET">2612 <diagnostic code="ZJPE0010" name="JSONML_ARRAY_REQUIRES_BRACKET">
2565 <value>JsonML (array form) must start with '['</value>2613 <value>JsonML (array form) must start with '['</value>
2566 </diagnostic>2614 </diagnostic>
@@ -2607,17 +2655,17 @@
26072655
2608 <diagnostic code="JNTY0002" if="defined(ZORBA_WITH_JSON)">2656 <diagnostic code="JNTY0002" if="defined(ZORBA_WITH_JSON)">
2609 <comment>It is a type error if the right-hand-side expression of a pair constructor does not return exactly one item.</comment>2657 <comment>It is a type error if the right-hand-side expression of a pair constructor does not return exactly one item.</comment>
2610 <value>Pair value returns no, or more than one, item.</value>2658 <value>pair value returns no, or more than one, item</value>
2611 </diagnostic>2659 </diagnostic>
2612 2660
2613 <diagnostic code="JNDY0003" if="defined(ZORBA_WITH_JSON)">2661 <diagnostic code="JNDY0003" if="defined(ZORBA_WITH_JSON)">
2614 <comment>It is a dynamic error if two pairs in an object constructor or in a simple object union have the same name.</comment>2662 <comment>It is a dynamic error if two pairs in an object constructor or in a simple object union have the same name.</comment>
2615 <value>"$1": pair with the same name already exists in object.</value>2663 <value>"$1": pair with the same name already exists in object</value>
2616 </diagnostic>2664 </diagnostic>
2617 2665
2618 <diagnostic code="JNTY0004" if="defined(ZORBA_WITH_JSON)">2666 <diagnostic code="JNTY0004" if="defined(ZORBA_WITH_JSON)">
2619 <comment>It is a type error to call fn:data on a sequence containing an array or an object.</comment>2667 <comment>It is a type error to call fn:data on a sequence containing an array or an object.</comment>
2620 <value>Cannot atomize an $1 item. An $1 has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item).</value>2668 <value>can not atomize an $1 item: an $1 has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item)</value>
2621 </diagnostic>2669 </diagnostic>
26222670
2623 <diagnostic code="JNUP0005" if="defined(ZORBA_WITH_JSON)">2671 <diagnostic code="JNUP0005" if="defined(ZORBA_WITH_JSON)">
@@ -2630,14 +2678,14 @@
2630 <diagnostic code="JNUP0006" if="defined(ZORBA_WITH_JSON)">2678 <diagnostic code="JNUP0006" if="defined(ZORBA_WITH_JSON)">
2631 <comment>It is a dynamic error if upd:applyUpdates causes an object to contain two pairs with the same name.</comment>2679 <comment>It is a dynamic error if upd:applyUpdates causes an object to contain two pairs with the same name.</comment>
26322680
2633 <value>"$1": pair to insert already exists in object.</value>2681 <value>"$1": pair to insert already exists in object</value>
26342682
2635 </diagnostic>2683 </diagnostic>
2636 2684
2637 <diagnostic code="JNUP0007" if="defined(ZORBA_WITH_JSON)">2685 <diagnostic code="JNUP0007" if="defined(ZORBA_WITH_JSON)">
2638 <comment>It is a type error if, in an updating expression, an array selector cannot be cast to xs:integer or if an object selector cannot be cast to xs:string.</comment>2686 <comment>It is a type error if, in an updating expression, an array selector cannot be cast to xs:integer or if an object selector cannot be cast to xs:string.</comment>
2639 2687
2640 <value>$1 - wrong type for object/array selector in update expression.</value>2688 <value>"$1": wrong type for object/array selector in update expression</value>
2641 2689
2642 <entry key="Object">2690 <entry key="Object">
2643 <value>"$2": can not be promoted to type xs:string</value>2691 <value>"$2": can not be promoted to type xs:string</value>
@@ -2663,7 +2711,7 @@
2663 <value>$1</value>2711 <value>$1</value>
26642712
2665 <entry key="Object">2713 <entry key="Object">
2666 <value>"$2": target of a renaming expression or of a non-position-inserting expression is not an object.</value>2714 <value>"$2": target of a renaming expression or of a non-position-inserting expression is not an object</value>
2667 </entry>2715 </entry>
26682716
2669 <entry key="Array">2717 <entry key="Array">
@@ -2671,7 +2719,7 @@
2671 </entry>2719 </entry>
26722720
2673 <entry key="ObjectArray">2721 <entry key="ObjectArray">
2674 <value>"$2": target of a deleting or replacing expression is not a JSON item.</value>2722 <value>"$2": target of a deleting or replacing expression is not a JSON item</value>
2675 </entry>2723 </entry>
26762724
2677 </diagnostic>2725 </diagnostic>
@@ -2700,6 +2748,15 @@
2700 <value>can not serialize multiple top-level items as JSON</value>2748 <value>can not serialize multiple top-level items as JSON</value>
2701 </diagnostic>2749 </diagnostic>
27022750
2751 <diagnostic code="JNSE0013" if="defined(ZORBA_WITH_JSON)">
2752 <comment>It is a dynamic error to serialize an atomic value not
2753 supported by JSON or a node with the JSON output method and with
2754 the jsoniq-serialization-extensions serialization parameter
2755 set to false.</comment>
2756
2757 <value>can not serialize value as JSON: $1</value>
2758 </diagnostic>
2759
2703 <diagnostic code="JNSE0014" if="defined(ZORBA_WITH_JSON)">2760 <diagnostic code="JNSE0014" if="defined(ZORBA_WITH_JSON)">
2704 <comment>It is a dynamic error to serialize a function or a node with the2761 <comment>It is a dynamic error to serialize a function or a node with the
2705 JSON output method.</comment>2762 JSON output method.</comment>
@@ -2710,7 +2767,7 @@
2710 <comment>It is a dynamic error to serialize a sequence that does2767 <comment>It is a dynamic error to serialize a sequence that does
2711 not exist of exactly one document node with XML, HTML, XHTML, Text.2768 not exist of exactly one document node with XML, HTML, XHTML, Text.
2712 </comment>2769 </comment>
2713 <value>$1: invalid serialization method for item type ($2)</value>2770 <value>"$1": invalid serialization method for item type ($2)</value>
2714 </diagnostic>2771 </diagnostic>
27152772
2716 <diagnostic code="JNUP0016" if="defined(ZORBA_WITH_JSON)">2773 <diagnostic code="JNUP0016" if="defined(ZORBA_WITH_JSON)">
@@ -2719,29 +2776,29 @@
2719 <value>$1</value>2776 <value>$1</value>
2720 2777
2721 <entry key="Object">2778 <entry key="Object">
2722 <value>"$2": selector cannot be resolved against supplied object.</value>2779 <value>"$2": selector cannot be resolved against supplied object</value>
2723 </entry>2780 </entry>
27242781
2725 <entry key="Array">2782 <entry key="Array">
2726 <value>"$2": selector cannot be resolved against supplied array.</value>2783 <value>"$2": selector cannot be resolved against supplied array</value>
2727 </entry>2784 </entry>
2728 </diagnostic>2785 </diagnostic>
2729 2786
2730 <diagnostic code="JNUP0017" if="defined(ZORBA_WITH_JSON)">2787 <diagnostic code="JNUP0017" if="defined(ZORBA_WITH_JSON)">
2731 <comment> It is a dynamic error if the value in a replace expression is not exactly a single item.</comment>2788 <comment> It is a dynamic error if the value in a replace expression is not exactly a single item.</comment>
2732 <value>Cannot replace with less or more than an item.</value>2789 <value>can not replace with less or more than an item</value>
2733 </diagnostic>2790 </diagnostic>
2734 2791
2735 <diagnostic code="JNTY0018" if="defined(ZORBA_WITH_JSON)">2792 <diagnostic code="JNTY0018" if="defined(ZORBA_WITH_JSON)">
2736 <comment>It is a dynamic error if there is not exactly one supplied parameter for an object or array selector.</comment>2793 <comment>It is a dynamic error if there is not exactly one supplied parameter for an object or array selector.</comment>
2737 2794
2738 <value>Object or array selection needs exactly one parameter.</value>2795 <value>object or array selection needs exactly one parameter</value>
2739 </diagnostic>2796 </diagnostic>
2740 2797
2741 <diagnostic code="JNUP0019" if="defined(ZORBA_WITH_JSON)">2798 <diagnostic code="JNUP0019" if="defined(ZORBA_WITH_JSON)">
2742 <comment>It is a dynamic error if the content expression, in an object insert expression, does not evaluate to a sequence of objects.</comment>2799 <comment>It is a dynamic error if the content expression, in an object insert expression, does not evaluate to a sequence of objects.</comment>
2743 2800
2744 <value>The content of an insert expression must evaluate to a sequence of objects.</value>2801 <value>"$1": invalid type (content of insert expression must evaluate to a sequence of objects)</value>
2745 </diagnostic>2802 </diagnostic>
2746 2803
2747 <diagnostic code="JNTY0023" if="defined(ZORBA_WITH_JSON)">2804 <diagnostic code="JNTY0023" if="defined(ZORBA_WITH_JSON)">
@@ -2787,7 +2844,7 @@
2787 </diagnostic>2844 </diagnostic>
27882845
2789 <diagnostic code="ZWST0004" name="AMBIGUOUS_SEQUENTIAL_FLWOR">2846 <diagnostic code="ZWST0004" name="AMBIGUOUS_SEQUENTIAL_FLWOR">
2790 <value>Sequential FLWOR expr may not have the semantics you expect</value>2847 <value>sequential FLWOR expr may not have the semantics you expect</value>
2791 </diagnostic>2848 </diagnostic>
27922849
2793 <diagnostic code="ZWST0005" name="CACHING_NOT_POSSIBLE">2850 <diagnostic code="ZWST0005" name="CACHING_NOT_POSSIBLE">
@@ -3003,6 +3060,10 @@
3003 <value>collection iterator not open</value>3060 <value>collection iterator not open</value>
3004 </entry>3061 </entry>
30053062
3063 <entry key="DefaultCollection">
3064 <value>default collection</value>
3065 </entry>
3066
3006 <entry key="DefaultCollation">3067 <entry key="DefaultCollation">
3007 <value>default collation</value>3068 <value>default collation</value>
3008 </entry>3069 </entry>
@@ -3107,11 +3168,11 @@
3107 <value>full-text was not enabled in this build</value>3168 <value>full-text was not enabled in this build</value>
3108 </entry>3169 </entry>
31093170
3110 <entry key="FunctionFailedErrorCodeMessage_123">3171 <entry key="FunctionFailedErrorCodeMessage_234">
3111 <value>$2 failed (error $3): $4</value>3172 <value>$2 failed (error $3): $4</value>
3112 </entry>3173 </entry>
31133174
3114 <entry key="FunctionFailed_12o">3175 <entry key="FunctionFailed_23o">
3115 <value>$2 failed${: 3}</value>3176 <value>$2 failed${: 3}</value>
3116 </entry>3177 </entry>
31173178
@@ -3271,6 +3332,14 @@
3271 <value>document, collection, or module resolver required but no SerializationCallback given</value>3332 <value>document, collection, or module resolver required but no SerializationCallback given</value>
3272 </entry>3333 </entry>
32733334
3335 <entry key="NoExternalFunction_2">
3336 <value>"$2": external function not found</value>
3337 </entry>
3338
3339 <entry key="NoExternalModuleFromDLL_2">
3340 <value>required external module "$2" not found</value>
3341 </entry>
3342
3274 <entry key="NoSerializationCallbackForModule">3343 <entry key="NoSerializationCallbackForModule">
3275 <value>no SerializationCallback for required external module "$2"</value>3344 <value>no SerializationCallback for required external module "$2"</value>
3276 </entry>3345 </entry>
32773346
=== modified file 'src/diagnostics/dict.h'
--- src/diagnostics/dict.h 2012-09-19 21:16:15 +0000
+++ src/diagnostics/dict.h 2012-11-17 18:50:26 +0000
@@ -17,6 +17,8 @@
17#ifndef ZORBA_DIAGNOSTIC_DICT_H17#ifndef ZORBA_DIAGNOSTIC_DICT_H
18#define ZORBA_DIAGNOSTIC_DICT_H18#define ZORBA_DIAGNOSTIC_DICT_H
1919
20#include "diagnostics/dict_zed_keys.h"
21
20namespace zorba {22namespace zorba {
21namespace diagnostic {23namespace diagnostic {
22namespace dict {24namespace dict {
@@ -40,7 +42,7 @@
40 * \endcode42 * \endcode
41 * \hideinitializer43 * \hideinitializer
42 */44 */
43#define ZED(DICT_KEY) ZED_PREFIX #DICT_KEY45#define ZED(DICT_KEY) ZED_##DICT_KEY
4446
45/**47/**
46 * Looks up the given key in the language dictionary.48 * Looks up the given key in the language dictionary.
4749
=== added file 'src/diagnostics/dict_zed_keys_h.xq'
--- src/diagnostics/dict_zed_keys_h.xq 1970-01-01 00:00:00 +0000
+++ src/diagnostics/dict_zed_keys_h.xq 2012-11-17 18:50:26 +0000
@@ -0,0 +1,55 @@
1(:
2 : Copyright 2006-2009 The FLWOR Foundation.
3 :
4 : Licensed under the Apache License, Version 2.0 (the "License");
5 : you may not use this file except in compliance with the License.
6 : You may obtain a copy of the License at
7 :
8 : http://www.apache.org/licenses/LICENSE-2.0
9 :
10 : Unless required by applicable law or agreed to in writing, software
11 : distributed under the License is distributed on an "AS IS" BASIS,
12 : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 : See the License for the specific language governing permissions and
14 : limitations under the License.
15:)
16
17import module namespace util = "http://www.zorba-xquery.com/diagnostic/util" at "diagnostic_util.xq";
18
19declare function local:make-zed-defines( $doc ) as xs:string*
20{
21 for $entry in ( $doc//entry )
22 let $key := $entry/@key
23 return
24 if ( contains( $key, ' ' ) )
25 then ()
26 else
27 let $full_key :=
28 if ( $entry/parent::diagnostic )
29 then concat( $entry/parent::diagnostic/@code, "_", $key )
30 else $key
31 return concat( "#define ZED_", $full_key, ' "~', $full_key, '"' )
32};
33
34declare variable $input external;
35
36string-join(
37 ( util:copyright(),
38 '#ifndef ZORBA_DIAGNOSTICS_ZED_KEYS',
39 '#define ZORBA_DIAGNOSTICS_ZED_KEYS',
40 '',
41 local:make-zed-defines( $input ),
42 '',
43 '#endif /* ZORBA_DIAGNOSTICS_ZED_KEYS */',
44 '/*',
45 ' * Local variables:',
46 ' * mode: c++',
47 ' * End:',
48 ' */',
49 '/* vim:set et sw=2 ts=2: */'
50 ),
51 $util:newline
52),
53$util:newline
54
55(: vim:set syntax=xquery et sw=2 ts=2: :)
056
=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp 2012-11-08 05:38:30 +0000
+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2012-11-17 18:50:26 +0000
@@ -1246,6 +1246,9 @@
1246JSONiqErrorCode JNSE0012( "JNSE0012" );1246JSONiqErrorCode JNSE0012( "JNSE0012" );
12471247
12481248
1249JSONiqErrorCode JNSE0013( "JNSE0013" );
1250
1251
1249JSONiqErrorCode JNSE0014( "JNSE0014" );1252JSONiqErrorCode JNSE0014( "JNSE0014" );
12501253
12511254
12521255
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2012-11-08 05:38:30 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2012-11-17 18:50:26 +0000
@@ -98,7 +98,7 @@
98 { "FTST0019", "\"$1\": match option specified more than once" },98 { "FTST0019", "\"$1\": match option specified more than once" },
99#endif99#endif
100#if defined(ZORBA_WITH_JSON)100#if defined(ZORBA_WITH_JSON)
101 { "JNDY0003", "\"$1\": pair with the same name already exists in object." },101 { "JNDY0003", "\"$1\": pair with the same name already exists in object" },
102#endif102#endif
103#if defined(ZORBA_WITH_JSON)103#if defined(ZORBA_WITH_JSON)
104 { "JNDY0021", "$1" },104 { "JNDY0021", "$1" },
@@ -107,22 +107,25 @@
107 { "JNSE0012", "can not serialize multiple top-level items as JSON" },107 { "JNSE0012", "can not serialize multiple top-level items as JSON" },
108#endif108#endif
109#if defined(ZORBA_WITH_JSON)109#if defined(ZORBA_WITH_JSON)
110 { "JNSE0013", "can not serialize value as JSON: $1" },
111#endif
112#if defined(ZORBA_WITH_JSON)
110 { "JNSE0014", "can not serialize a node or function item as JSON" },113 { "JNSE0014", "can not serialize a node or function item as JSON" },
111#endif114#endif
112#if defined(ZORBA_WITH_JSON)115#if defined(ZORBA_WITH_JSON)
113 { "JNSE0022", "$1: invalid serialization method for item type ($2)" },116 { "JNSE0022", "\"$1\": invalid serialization method for item type ($2)" },
114#endif117#endif
115#if defined(ZORBA_WITH_JSON)118#if defined(ZORBA_WITH_JSON)
116 { "JNTY0002", "Pair value returns no, or more than one, item." },119 { "JNTY0002", "pair value returns no, or more than one, item" },
117#endif120#endif
118#if defined(ZORBA_WITH_JSON)121#if defined(ZORBA_WITH_JSON)
119 { "JNTY0004", "Cannot atomize an $1 item. An $1 has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item)." },122 { "JNTY0004", "can not atomize an $1 item: an $1 has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item)" },
120#endif123#endif
121#if defined(ZORBA_WITH_JSON)124#if defined(ZORBA_WITH_JSON)
122 { "JNTY0011", "JSON item cannot appear in content sequence of node constructor or updating expression" },125 { "JNTY0011", "JSON item cannot appear in content sequence of node constructor or updating expression" },
123#endif126#endif
124#if defined(ZORBA_WITH_JSON)127#if defined(ZORBA_WITH_JSON)
125 { "JNTY0018", "Object or array selection needs exactly one parameter." },128 { "JNTY0018", "object or array selection needs exactly one parameter" },
126#endif129#endif
127#if defined(ZORBA_WITH_JSON)130#if defined(ZORBA_WITH_JSON)
128 { "JNTY0020", "$1: invalid option type for option $2 (expected $3)" },131 { "JNTY0020", "$1: invalid option type for option $2 (expected $3)" },
@@ -137,10 +140,10 @@
137 { "JNUP0005", "\"$1\": duplicate pair to insert" },140 { "JNUP0005", "\"$1\": duplicate pair to insert" },
138#endif141#endif
139#if defined(ZORBA_WITH_JSON)142#if defined(ZORBA_WITH_JSON)
140 { "JNUP0006", "\"$1\": pair to insert already exists in object." },143 { "JNUP0006", "\"$1\": pair to insert already exists in object" },
141#endif144#endif
142#if defined(ZORBA_WITH_JSON)145#if defined(ZORBA_WITH_JSON)
143 { "JNUP0007", "$1 - wrong type for object/array selector in update expression." },146 { "JNUP0007", "\"$1\": wrong type for object/array selector in update expression" },
144#endif147#endif
145#if defined(ZORBA_WITH_JSON)148#if defined(ZORBA_WITH_JSON)
146 { "JNUP0008", "$1" },149 { "JNUP0008", "$1" },
@@ -155,10 +158,10 @@
155 { "JNUP0016", "$1" },158 { "JNUP0016", "$1" },
156#endif159#endif
157#if defined(ZORBA_WITH_JSON)160#if defined(ZORBA_WITH_JSON)
158 { "JNUP0017", "Cannot replace with less or more than an item." },161 { "JNUP0017", "can not replace with less or more than an item" },
159#endif162#endif
160#if defined(ZORBA_WITH_JSON)163#if defined(ZORBA_WITH_JSON)
161 { "JNUP0019", "The content of an insert expression must evaluate to a sequence of objects." },164 { "JNUP0019", "\"$1\": invalid type (content of insert expression must evaluate to a sequence of objects)" },
162#endif165#endif
163 { "SENR0001", "\"$1\": can not serialize $2" },166 { "SENR0001", "\"$1\": can not serialize $2" },
164 { "SEPM0004", "doctype-system parameter, or standalone parameter with a value other than \"omit\", specified" },167 { "SEPM0004", "doctype-system parameter, or standalone parameter with a value other than \"omit\", specified" },
@@ -270,7 +273,7 @@
270 { "XUDY0017", "node is target of multiple \"replace value of\" expressions in same query" },273 { "XUDY0017", "node is target of multiple \"replace value of\" expressions in same query" },
271 { "XUDY0018", "\"$1\": function declared external, non-updating returns non-empty pending update list" },274 { "XUDY0018", "\"$1\": function declared external, non-updating returns non-empty pending update list" },
272 { "XUDY0019", "\"$1\": function declated external, updating returns non-empty data model instance" },275 { "XUDY0019", "\"$1\": function declated external, updating returns non-empty data model instance" },
273 { "XUDY0021", "updates violate constraint" },276 { "XUDY0021", "$1${ 2}" },
274 { "XUDY0023", "\"$1\": namespace binding conflicts with $2=$3" },277 { "XUDY0023", "\"$1\": namespace binding conflicts with $2=$3" },
275 { "XUDY0024", "\"$1\": namespace binding conflicts with $2=$3" },278 { "XUDY0024", "\"$1\": namespace binding conflicts with $2=$3" },
276 { "XUDY0027", "target expression is empty sequence" },279 { "XUDY0027", "target expression is empty sequence" },
@@ -320,8 +323,8 @@
320 { "ZAPI0043", "cannot serialize JSON item using current output method" },323 { "ZAPI0043", "cannot serialize JSON item using current output method" },
321 { "ZAPI0045", "cannot serialize sequence containing both JSON and XML items" },324 { "ZAPI0045", "cannot serialize sequence containing both JSON and XML items" },
322 { "ZAPI0070", "\"$1\": invalid serialization method for SAX" },325 { "ZAPI0070", "\"$1\": invalid serialization method for SAX" },
323 { "ZAPI0080", "can not retrieve node-reference for a node that is not in a collection." },326 { "ZAPI0080", "can not retrieve node-reference for a node that is not in a collection" },
324 { "ZAPI0090", "a non root element cannot be validated in place." },327 { "ZAPI0090", "non root element cannot be validated in place" },
325 { "ZCSE0001", "\"$1\": nonexistent input field" },328 { "ZCSE0001", "\"$1\": nonexistent input field" },
326 { "ZCSE0002", "\"$1\": incompatible input field${: type=2}${, class=3}" },329 { "ZCSE0002", "\"$1\": incompatible input field${: type=2}${, class=3}" },
327 { "ZCSE0003", "\"$1\": unrecognized class field" },330 { "ZCSE0003", "\"$1\": unrecognized class field" },
@@ -455,10 +458,10 @@
455 { "ZSTR0055", "streamable string has already been consumed" },458 { "ZSTR0055", "streamable string has already been consumed" },
456 { "ZSTR0060", "out of range: $1" },459 { "ZSTR0060", "out of range: $1" },
457 { "ZSTR0065", "Zorba did not close properly, objects may still in memory.\n$1 referenced URI(s) remain in the string pool.\nFor help avoiding this message please refer to http://www.zorba-xquery.com/html/documentation in section General Architecture -> Memory Leaks." },460 { "ZSTR0065", "Zorba did not close properly, objects may still in memory.\n$1 referenced URI(s) remain in the string pool.\nFor help avoiding this message please refer to http://www.zorba-xquery.com/html/documentation in section General Architecture -> Memory Leaks." },
458 { "ZSTR0066", "$1: does not reference a node in collection $2." },461 { "ZSTR0066", "$1: does not reference a node in collection $2" },
459 { "ZWST0002", "\"$1\": unknown or unsupported annotation" },462 { "ZWST0002", "\"$1\": unknown or unsupported annotation" },
460 { "ZWST0003", "\"$1\": function declared sequential, but has non-sequential body" },463 { "ZWST0003", "\"$1\": function declared sequential, but has non-sequential body" },
461 { "ZWST0004", "Sequential FLWOR expr may not have the semantics you expect" },464 { "ZWST0004", "sequential FLWOR expr may not have the semantics you expect" },
462 { "ZWST0005", "\"$1\": function caching not possible; $2" },465 { "ZWST0005", "\"$1\": function caching not possible; $2" },
463 { "ZWST0006", "\"$1\": function caching might not give the intended result because the function is declared as $2" },466 { "ZWST0006", "\"$1\": function caching might not give the intended result because the function is declared as $2" },
464 { "ZXQD0001", "\"$1\": prefix not declared when calling function \"$2\" from $3" },467 { "ZXQD0001", "\"$1\": prefix not declared when calling function \"$2\" from $3" },
@@ -560,6 +563,7 @@
560 { "~ClosingBraceWithoutOpen", "'}' encountered without '{' first" },563 { "~ClosingBraceWithoutOpen", "'}' encountered without '{' first" },
561 { "~CollectionIteratorNotOpen", "collection iterator not open" },564 { "~CollectionIteratorNotOpen", "collection iterator not open" },
562 { "~DefaultCollation", "default collation" },565 { "~DefaultCollation", "default collation" },
566 { "~DefaultCollection", "default collection" },
563 { "~DivisionNoINF", "division can not have +-INF dividend" },567 { "~DivisionNoINF", "division can not have +-INF dividend" },
564 { "~DivisionNoNaN", "division can not involve NaN" },568 { "~DivisionNoNaN", "division can not involve NaN" },
565 { "~DocNodeMultipleElements", "document node has more than one element" },569 { "~DocNodeMultipleElements", "document node has more than one element" },
@@ -596,8 +600,8 @@
596 { "~FormatNumberIntegerPart", ": the integer part of a sub-picture must not contain a member of the decimal-digit-family that is followed by an optional-digit-sign" },600 { "~FormatNumberIntegerPart", ": the integer part of a sub-picture must not contain a member of the decimal-digit-family that is followed by an optional-digit-sign" },
597 { "~FormatNumberPercentPermille", ": a sub-picture must not contain more than one percent-sign or per-mille-sign, and it must not contain one of each" },601 { "~FormatNumberPercentPermille", ": a sub-picture must not contain more than one percent-sign or per-mille-sign, and it must not contain one of each" },
598 { "~FullTextNotEnabled", "full-text was not enabled in this build" },602 { "~FullTextNotEnabled", "full-text was not enabled in this build" },
599 { "~FunctionFailedErrorCodeMessage_123", "$2 failed (error $3): $4" },603 { "~FunctionFailedErrorCodeMessage_234", "$2 failed (error $3): $4" },
600 { "~FunctionFailed_12o", "$2 failed${: 3}" },604 { "~FunctionFailed_23o", "$2 failed${: 3}" },
601 { "~FunctionUndeclared_3", "function with arity $3 not declared" },605 { "~FunctionUndeclared_3", "function with arity $3 not declared" },
602 { "~GoodValuesAreUTF8", "valid values are: UTF-8, UTF-16" },606 { "~GoodValuesAreUTF8", "valid values are: UTF-8, UTF-16" },
603 { "~GoodValuesAreXMLEtc", "valid values are: xml, html, xhtml, text, binary, json, jsoniq" },607 { "~GoodValuesAreXMLEtc", "valid values are: xml, html, xhtml, text, binary, json, jsoniq" },
@@ -610,10 +614,10 @@
610 { "~JNUP0007_Object", "\"$2\": can not be promoted to type xs:string" },614 { "~JNUP0007_Object", "\"$2\": can not be promoted to type xs:string" },
611 { "~JNUP0007_ObjectArray", "\"$2\": can not be promoted to type xs:anyAtomicType" },615 { "~JNUP0007_ObjectArray", "\"$2\": can not be promoted to type xs:anyAtomicType" },
612 { "~JNUP0008_Array", "\"$2\": target of an appending expression or of a position-inserting expression is not an array" },616 { "~JNUP0008_Array", "\"$2\": target of an appending expression or of a position-inserting expression is not an array" },
613 { "~JNUP0008_Object", "\"$2\": target of a renaming expression or of a non-position-inserting expression is not an object." },617 { "~JNUP0008_Object", "\"$2\": target of a renaming expression or of a non-position-inserting expression is not an object" },
614 { "~JNUP0008_ObjectArray", "\"$2\": target of a deleting or replacing expression is not a JSON item." },618 { "~JNUP0008_ObjectArray", "\"$2\": target of a deleting or replacing expression is not a JSON item" },
615 { "~JNUP0016_Array", "\"$2\": selector cannot be resolved against supplied array." },619 { "~JNUP0016_Array", "\"$2\": selector cannot be resolved against supplied array" },
616 { "~JNUP0016_Object", "\"$2\": selector cannot be resolved against supplied object." },620 { "~JNUP0016_Object", "\"$2\": selector cannot be resolved against supplied object" },
617 { "~JSON parser error", "JSON parser error" },621 { "~JSON parser error", "JSON parser error" },
618 { "~JSON serialization error", "JSON serialization error" },622 { "~JSON serialization error", "JSON serialization error" },
619 { "~JSON_ILLEGAL_CHARACTER", "'$2': illegal JSON character${ at 3}" },623 { "~JSON_ILLEGAL_CHARACTER", "'$2': illegal JSON character${ at 3}" },
@@ -649,6 +653,8 @@
649 { "~NoEmptyLocalname", "local-name can not be empty" },653 { "~NoEmptyLocalname", "local-name can not be empty" },
650 { "~NoEmptySeqAsBaseURI", "can't treat empty sequence as base URI" },654 { "~NoEmptySeqAsBaseURI", "can't treat empty sequence as base URI" },
651 { "~NoEmptySeqAsCollationParam", "empty-sequence not allowed as collation parameter" },655 { "~NoEmptySeqAsCollationParam", "empty-sequence not allowed as collation parameter" },
656 { "~NoExternalFunction_2", "\"$2\": external function not found" },
657 { "~NoExternalModuleFromDLL_2", "required external module \"$2\" not found" },
652 { "~NoHashItemOfType_2", "can not hash item of type \"$2\"" },658 { "~NoHashItemOfType_2", "can not hash item of type \"$2\"" },
653 { "~NoInputData", "no input data" },659 { "~NoInputData", "no input data" },
654 { "~NoModuleURIResolver", "no module URI resolver could be retrieved using SerializationCallback" },660 { "~NoModuleURIResolver", "no module URI resolver could be retrieved using SerializationCallback" },
@@ -862,27 +868,29 @@
862 { "~VariabledHasNoValue", "variable has no value" },868 { "~VariabledHasNoValue", "variable has no value" },
863 { "~VariabledUndeclared", "undeclared variable" },869 { "~VariabledUndeclared", "undeclared variable" },
864 { "~XMLSchema", "XML schema" },870 { "~XMLSchema", "XML schema" },
865 { "~XPST0003_Anotations", "function and variable annotations only available in XQuery 3.0 or later" },871 { "~XPST0003_Annotations", "function and variable annotations only available in XQuery 3.0 or later" },
866 { "~XPST0003_CountClause11", "\"count\" clause only available in XQuery 3.0 or later" },872 { "~XPST0003_CountClause30", "\"count\" clause only available in XQuery 3.0 or later" },
867 { "~XPST0003_ModuleDeclNotInMain", "module declaration must not be in main module" },873 { "~XPST0003_ModuleDeclNotInMain", "module declaration must not be in main module" },
868 { "~XPST0003_OuterForClause11", "\"outer-for\" clause only available in XQuery 3.0 or later" },874 { "~XPST0003_OuterForClause30", "\"outer-for\" clause only available in XQuery 3.0 or later" },
869 { "~XPST0003_PiTarget", "\"XML\" not allowed as target of a direct processing-instruction constructor" },875 { "~XPST0003_PiTarget", "\"XML\" not allowed as target of a direct processing-instruction constructor" },
870 { "~XPST0003_Scripting", "scripting feature not available" },876 { "~XPST0003_Scripting", "scripting feature not available" },
871 { "~XPST0003_StartEndTagMismatch_23", "start tag \"$2\" does not match end tag \"$3\"" },877 { "~XPST0003_StartEndTagMismatch_23", "start tag \"$2\" does not match end tag \"$3\"" },
872 { "~XPST0003_SwitchExpr11", "\"switch\" expressions only available in XQuery 3.0 or later" },878 { "~XPST0003_SwitchExpr30", "\"switch\" expressions only available in XQuery 3.0 or later" },
873 { "~XPST0003_TryCatchExpr11", "\"try/catch\" expressions only available in XQuery 3.0 or later" },879 { "~XPST0003_TryCatchExpr30", "\"try/catch\" expressions only available in XQuery 3.0 or later" },
874 { "~XPST0003_WindowClause11", "\"window\" clause only available in XQuery 3.0 or later" },880 { "~XPST0003_WindowClause30", "\"window\" clause only available in XQuery 3.0 or later" },
875 { "~XPST0003_XQueryVersionAtLeast30_2", "\"$2\": XQuery version must be at least 3.0" },881 { "~XPST0003_XQueryVersionAtLeast30_2", "\"$2\": XQuery version must be at least 3.0" },
876 { "~XPTY0004_FormatNumber_2", "the first parameter to the format-number() function is of type $2, which is not allowed" },882 { "~XPTY0004_FormatNumber_2", "first parameter to format-number() function is type $2 that is not allowed" },
877 { "~XPTY0004_FuncParam", "$2 can not be promoted to parameter type $3 of function $4()" },883 { "~XPTY0004_JSONIQ_SELECTOR", "can not atomize and/or cast value of type $2 to string" },
878 { "~XPTY0004_FuncReturn", "$2 can not be promoted to return type $3 of function $4()" },
879 { "~XPTY0004_JSONIQ_SELECTOR", "Cannot atomize and/or cast value of type $2 to a string." },
880 { "~XPTY0004_MultiValuedGroupingKey", "atomization of grouping variable produces more than one item" },884 { "~XPTY0004_MultiValuedGroupingKey", "atomization of grouping variable produces more than one item" },
881 { "~XPTY0004_NoMultiSeqTypePromotion", "sequence of more than one item can not be promoted to type $2" },885 { "~XPTY0004_NoMultiSeqTypePromotion_2", "sequence of more than one item can not be promoted to type $2" },
882 { "~XPTY0004_TypeMatch", "$2 can not be treated as type $3" },886 { "~XPTY0004_NoParamTypePromote_234", "$2 can not be promoted to parameter type $3 of function $4()" },
883 { "~XPTY0004_TypePromotion", "$2 can not be promoted to type $3" },887 { "~XPTY0004_NoReturnTypePromote_234", "$2 can not be promoted to return type $3 of function $4()" },
888 { "~XPTY0004_NoTreatAs_23", "$2 can not be treated as type $3" },
889 { "~XPTY0004_NoTypePromote_23", "$2 can not be promoted to type $3" },
884 { "~XQST0106_CONFLICTING", "conflicting" },890 { "~XQST0106_CONFLICTING", "conflicting" },
885 { "~XQST0106_THE_SAME", "the same" },891 { "~XQST0106_THE_SAME", "the same" },
892 { "~XUDY0021_AppliedAt", "(applied at $3)" },
893 { "~XUDY0021_AttributeName", "\"$3\": attribute with the same name already exists" },
886 { "~XUST0001_CONCAT", "comma expression with updating and non-updating branches" },894 { "~XUST0001_CONCAT", "comma expression with updating and non-updating branches" },
887 { "~XUST0001_Generic", "updating expression illegal here" },895 { "~XUST0001_Generic", "updating expression illegal here" },
888 { "~XUST0001_IF", "conditional expression with updating and non-updating branch" },896 { "~XUST0001_IF", "conditional expression with updating and non-updating branch" },
889897
=== added file 'src/diagnostics/pregenerated/dict_zed_keys.h'
--- src/diagnostics/pregenerated/dict_zed_keys.h 1970-01-01 00:00:00 +0000
+++ src/diagnostics/pregenerated/dict_zed_keys.h 2012-11-17 18:50:26 +0000
@@ -0,0 +1,338 @@
1/**
2 * Copyright 2006-2011 The FLWOR Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /*
18 * THIS FILE IS GENERATED.
19 * PLEASE DO NOT EDIT.
20 */
21
22#ifndef ZORBA_DIAGNOSTICS_ZED_KEYS
23#define ZORBA_DIAGNOSTICS_ZED_KEYS
24
25#define ZED_XPST0003_StartEndTagMismatch_23 "~XPST0003_StartEndTagMismatch_23"
26#define ZED_XPST0003_ModuleDeclNotInMain "~XPST0003_ModuleDeclNotInMain"
27#define ZED_XPST0003_XQueryVersionAtLeast30_2 "~XPST0003_XQueryVersionAtLeast30_2"
28#define ZED_XPST0003_OuterForClause30 "~XPST0003_OuterForClause30"
29#define ZED_XPST0003_WindowClause30 "~XPST0003_WindowClause30"
30#define ZED_XPST0003_CountClause30 "~XPST0003_CountClause30"
31#define ZED_XPST0003_SwitchExpr30 "~XPST0003_SwitchExpr30"
32#define ZED_XPST0003_TryCatchExpr30 "~XPST0003_TryCatchExpr30"
33#define ZED_XPST0003_Annotations "~XPST0003_Annotations"
34#define ZED_XPST0003_Scripting "~XPST0003_Scripting"
35#define ZED_XPST0003_PiTarget "~XPST0003_PiTarget"
36#define ZED_XPTY0004_NoReturnTypePromote_234 "~XPTY0004_NoReturnTypePromote_234"
37#define ZED_XPTY0004_NoParamTypePromote_234 "~XPTY0004_NoParamTypePromote_234"
38#define ZED_XPTY0004_NoTypePromote_23 "~XPTY0004_NoTypePromote_23"
39#define ZED_XPTY0004_NoMultiSeqTypePromotion_2 "~XPTY0004_NoMultiSeqTypePromotion_2"
40#define ZED_XPTY0004_NoTreatAs_23 "~XPTY0004_NoTreatAs_23"
41#define ZED_XPTY0004_FormatNumber_2 "~XPTY0004_FormatNumber_2"
42#define ZED_XPTY0004_JSONIQ_SELECTOR "~XPTY0004_JSONIQ_SELECTOR"
43#define ZED_XPTY0004_MultiValuedGroupingKey "~XPTY0004_MultiValuedGroupingKey"
44#define ZED_XQST0106_THE_SAME "~XQST0106_THE_SAME"
45#define ZED_XQST0106_CONFLICTING "~XQST0106_CONFLICTING"
46#define ZED_FTST0009_BadStopWordsLang "~FTST0009_BadStopWordsLang"
47#define ZED_FTST0009_BadStemmerLang "~FTST0009_BadStemmerLang"
48#define ZED_FTST0009_BadThesaurusLang "~FTST0009_BadThesaurusLang"
49#define ZED_FTST0009_BadTokenizerLang "~FTST0009_BadTokenizerLang"
50#define ZED_XUST0001_CONCAT "~XUST0001_CONCAT"
51#define ZED_XUST0001_TRYCATCH "~XUST0001_TRYCATCH"
52#define ZED_XUST0001_Generic "~XUST0001_Generic"
53#define ZED_XUST0001_IF "~XUST0001_IF"
54#define ZED_XUST0001_UDF_2 "~XUST0001_UDF_2"
55#define ZED_XUDY0021_AttributeName "~XUDY0021_AttributeName"
56#define ZED_XUDY0021_AppliedAt "~XUDY0021_AppliedAt"
57#define ZED_ZXQP0004_TypeOps_is_in_scope_ForFunctionItemTypes "~ZXQP0004_TypeOps_is_in_scope_ForFunctionItemTypes"
58#define ZED_ZXQP0025_RESOURCE_NOT_FOUND "~ZXQP0025_RESOURCE_NOT_FOUND"
59#define ZED_ZXQD0004_NON_NEGATIVE "~ZXQD0004_NON_NEGATIVE"
60#define ZED_ZXQD0004_NOT_WITHIN_RANGE "~ZXQD0004_NOT_WITHIN_RANGE"
61#define ZED_ZDST0027_NO_KEY_TYPE_DECL "~ZDST0027_NO_KEY_TYPE_DECL"
62#define ZED_ZDST0027_NON_SPECIFIC_KEY_TYPE_DECL "~ZDST0027_NON_SPECIFIC_KEY_TYPE_DECL"
63#define ZED_ZDST0027_MULTI_VALUED_KEY_TYPE_DECL "~ZDST0027_MULTI_VALUED_KEY_TYPE_DECL"
64#define ZED_ZDST0027_NON_ATOMIC_KEY_TYPE "~ZDST0027_NON_ATOMIC_KEY_TYPE"
65#define ZED_ZDST0027_NON_ORDERED_KEY_TYPE "~ZDST0027_NON_ORDERED_KEY_TYPE"
66#define ZED_ZDST0060_unknown_namespace "~ZDST0060_unknown_namespace"
67#define ZED_ZDST0060_unknown_localname "~ZDST0060_unknown_localname"
68#define ZED_JNUP0007_Object "~JNUP0007_Object"
69#define ZED_JNUP0007_Array "~JNUP0007_Array"
70#define ZED_JNUP0007_ObjectArray "~JNUP0007_ObjectArray"
71#define ZED_JNUP0008_Object "~JNUP0008_Object"
72#define ZED_JNUP0008_Array "~JNUP0008_Array"
73#define ZED_JNUP0008_ObjectArray "~JNUP0008_ObjectArray"
74#define ZED_JNUP0016_Object "~JNUP0016_Object"
75#define ZED_JNUP0016_Array "~JNUP0016_Array"
76#define ZED_ZWST0005_RETURN_TYPE "~ZWST0005_RETURN_TYPE"
77#define ZED_ZWST0005_PARAM_TYPE "~ZWST0005_PARAM_TYPE"
78#define ZED_ZWST0005_UPDATING "~ZWST0005_UPDATING"
79#define ZED_ZWST0005_VARIADIC "~ZWST0005_VARIADIC"
80#define ZED_AllMatchesHasExcludes "~AllMatchesHasExcludes"
81#define ZED_AlreadySpecified "~AlreadySpecified"
82#define ZED_ArithOpNotDefinedBetween_23 "~ArithOpNotDefinedBetween_23"
83#define ZED_AtomizationHasMoreThanOneValue "~AtomizationHasMoreThanOneValue"
84#define ZED_AttributeName "~AttributeName"
85#define ZED_AttributeNode "~AttributeNode"
86#define ZED_BackRef0Illegal "~BackRef0Illegal"
87#define ZED_BackRefIllegalInCharClass "~BackRefIllegalInCharClass"
88#define ZED_BadAnyURI "~BadAnyURI"
89#define ZED_BadArgTypeForFn_2o34o "~BadArgTypeForFn_2o34o"
90#define ZED_BadCharAfter_34 "~BadCharAfter_34"
91#define ZED_BadCharInBraces_3 "~BadCharInBraces_3"
92#define ZED_BadDecDigit_3 "~BadDecDigit_3"
93#define ZED_BadFileURIAuthority_2 "~BadFileURIAuthority_2"
94#define ZED_BadHexDigit_3 "~BadHexDigit_3"
95#define ZED_BadHexSequence "~BadHexSequence"
96#define ZED_BadItem "~BadItem"
97#define ZED_BadIterator "~BadIterator"
98#define ZED_BadLibraryModule "~BadLibraryModule"
99#define ZED_BadRegexEscape_3 "~BadRegexEscape_3"
100#define ZED_BadPath "~BadPath"
101#define ZED_BadStreamState "~BadStreamState"
102#define ZED_BadTokenInBraces_3 "~BadTokenInBraces_3"
103#define ZED_BadTraceStream "~BadTraceStream"
104#define ZED_BadTypeFor_23 "~BadTypeFor_23"
105#define ZED_BadType_23o "~BadType_23o"
106#define ZED_BadURIScheme_3 "~BadURIScheme_3"
107#define ZED_BadURISyntaxForScheme_3 "~BadURISyntaxForScheme_3"
108#define ZED_BadUnicodeChar_3 "~BadUnicodeChar_3"
109#define ZED_BadWordNetPartOfSpeech_2 "~BadWordNetPartOfSpeech_2"
110#define ZED_BadWordNetPtr_2 "~BadWordNetPtr_2"
111#define ZED_BadXMLDocument_2o "~BadXMLDocument_2o"
112#define ZED_BadXMLNoOpeningTag "~BadXMLNoOpeningTag"
113#define ZED_BadXMLForXQDoc_3 "~BadXMLForXQDoc_3"
114#define ZED_BadXQueryVersion "~BadXQueryVersion"
115#define ZED_Base64BadChar "~Base64BadChar"
116#define ZED_Base64Multiple4 "~Base64Multiple4"
117#define ZED_BaseURI "~BaseURI"
118#define ZED_BoxCondTooManyColumns "~BoxCondTooManyColumns"
119#define ZED_CastFromToFailed_34 "~CastFromToFailed_34"
120#define ZED_CharExpected_3 "~CharExpected_3"
121#define ZED_CloneNotImplemented "~CloneNotImplemented"
122#define ZED_ClosingBraceWithoutOpen "~ClosingBraceWithoutOpen"
123#define ZED_CollectionIteratorNotOpen "~CollectionIteratorNotOpen"
124#define ZED_DefaultCollection "~DefaultCollection"
125#define ZED_DefaultCollation "~DefaultCollation"
126#define ZED_DivisionNoINF "~DivisionNoINF"
127#define ZED_DivisionNoNaN "~DivisionNoNaN"
128#define ZED_DocNodeMultipleElements "~DocNodeMultipleElements"
129#define ZED_EBVNotDefSeq_5 "~EBVNotDefSeq_5"
130#define ZED_EffectiveBooleanValue "~EffectiveBooleanValue"
131#define ZED_ElementName "~ElementName"
132#define ZED_ElementNode "~ElementNode"
133#define ZED_EmptyPath "~EmptyPath"
134#define ZED_EmptySeqNoCastToQName "~EmptySeqNoCastToQName"
135#define ZED_EmptySeqNoCastToTypeWithQuantOne "~EmptySeqNoCastToTypeWithQuantOne"
136#define ZED_EmptySeqNoFnRemoveArg "~EmptySeqNoFnRemoveArg"
137#define ZED_EmptySeqNoSearchItem "~EmptySeqNoSearchItem"
138#define ZED_EmptySequence "~EmptySequence"
139#define ZED_ErrorCodeMessage_12 "~ErrorCodeMessage_12"
140#define ZED_ExpectedNumericOrDurationType "~ExpectedNumericOrDurationType"
141#define ZED_ExpectedNumericType "~ExpectedNumericType"
142#define ZED_ExpectedType_5 "~ExpectedType_5"
143#define ZED_ExprNoReturnUpdateList "~ExprNoReturnUpdateList"
144#define ZED_ExprReturnsTooManyUpdateLists "~ExprReturnsTooManyUpdateLists"
145#define ZED_ExternFnDeterministic "~ExternFnDeterministic"
146#define ZED_ExternFnNondeterministic "~ExternFnNondeterministic"
147#define ZED_FileNotFoundOrReadable "~FileNotFoundOrReadable"
148#define ZED_FnNilledArgNotNode "~FnNilledArgNotNode"
149#define ZED_FnOnlyInXQueryVersion_3 "~FnOnlyInXQueryVersion_3"
150#define ZED_FullTextNotEnabled "~FullTextNotEnabled"
151#define ZED_FunctionFailedErrorCodeMessage_234 "~FunctionFailedErrorCodeMessage_234"
152#define ZED_FunctionFailed_23o "~FunctionFailed_23o"
153#define ZED_FunctionUndeclared_3 "~FunctionUndeclared_3"
154#define ZED_GoodValuesAreUTF8 "~GoodValuesAreUTF8"
155#define ZED_GoodValuesAreXMLEtc "~GoodValuesAreXMLEtc"
156#define ZED_GoodValuesAreYesNo "~GoodValuesAreYesNo"
157#define ZED_GoodValuesAreYesNoOmit "~GoodValuesAreYesNoOmit"
158#define ZED_HexBinaryMustBeEven "~HexBinaryMustBeEven"
159#define ZED_IncompleteKeyInIndexBuild "~IncompleteKeyInIndexBuild"
160#define ZED_IncompleteKeyInIndexRefresh "~IncompleteKeyInIndexRefresh"
161#define ZED_LibModVersionMismatch_3 "~LibModVersionMismatch_3"
162#define ZED_ModuleNotFound "~ModuleNotFound"
163#define ZED_MustBeAbsoluteURI "~MustBeAbsoluteURI"
164#define ZED_MustBeNCName "~MustBeNCName"
165#define ZED_NoAttrNodesInDocument "~NoAttrNodesInDocument"
166#define ZED_NoBindURI "~NoBindURI"
167#define ZED_NoCastToCInt_2 "~NoCastToCInt_2"
168#define ZED_NoCastTo_34o "~NoCastTo_34o"
169#define ZED_NoCastTo_45o "~NoCastTo_45o"
170#define ZED_NoCompareTypes_23 "~NoCompareTypes_23"
171#define ZED_NoCompareWithType_4 "~NoCompareWithType_4"
172#define ZED_NoDriveSpecification "~NoDriveSpecification"
173#define ZED_NoEmptyLocalname "~NoEmptyLocalname"
174#define ZED_NoEmptySeqAsBaseURI "~NoEmptySeqAsBaseURI"
175#define ZED_NoEmptySeqAsCollationParam "~NoEmptySeqAsCollationParam"
176#define ZED_NoHashItemOfType_2 "~NoHashItemOfType_2"
177#define ZED_NoInputData "~NoInputData"
178#define ZED_NoModuleURIResolver "~NoModuleURIResolver"
179#define ZED_NoMultiKeyNodeValues_2 "~NoMultiKeyNodeValues_2"
180#define ZED_NoParseFnArity "~NoParseFnArity"
181#define ZED_NoRebindPrefix "~NoRebindPrefix"
182#define ZED_NoRegisteredSerializationCallback_2 "~NoRegisteredSerializationCallback_2"
183#define ZED_NoResolveRelativeURI "~NoResolveRelativeURI"
184#define ZED_NoSeqAsArithOp "~NoSeqAsArithOp"
185#define ZED_NoSeqAsCollationParam "~NoSeqAsCollationParam"
186#define ZED_NoSeqCastToTypeWithQuantOneOrQuestion "~NoSeqCastToTypeWithQuantOneOrQuestion"
187#define ZED_NoSeqForFnOp_2 "~NoSeqForFnOp_2"
188#define ZED_NoSeqForConcat "~NoSeqForConcat"
189#define ZED_NoSeqInValueComp "~NoSeqInValueComp"
190#define ZED_NoSeqTestedForAtomicEquiv "~NoSeqTestedForAtomicEquiv"
191#define ZED_NoSerializationCallbackForDocColMod "~NoSerializationCallbackForDocColMod"
192#define ZED_NoExternalFunction_2 "~NoExternalFunction_2"
193#define ZED_NoExternalModuleFromDLL_2 "~NoExternalModuleFromDLL_2"
194#define ZED_NoSerializationCallbackForModule "~NoSerializationCallbackForModule"
195#define ZED_NoSerializationCallbackForTraceStream "~NoSerializationCallbackForTraceStream"
196#define ZED_NoSourceURI "~NoSourceURI"
197#define ZED_NoTreatAs_4 "~NoTreatAs_4"
198#define ZED_NoTypeInCtx "~NoTypeInCtx"
199#define ZED_NoTypeInMainModule_4 "~NoTypeInMainModule_4"
200#define ZED_NoTypeInModule_45 "~NoTypeInModule_45"
201#define ZED_NoURIAuthority "~NoURIAuthority"
202#define ZED_NoURIInStore "~NoURIInStore"
203#define ZED_NoURIScheme "~NoURIScheme"
204#define ZED_NoUntypedKeyNodeValue_2 "~NoUntypedKeyNodeValue_2"
205#define ZED_NodeIDNeedsBytes_2 "~NodeIDNeedsBytes_2"
206#define ZED_NodeIDTooBig "~NodeIDTooBig"
207#define ZED_NonClosedBackRef_3 "~NonClosedBackRef_3"
208#define ZED_NonFileThesaurusURI "~NonFileThesaurusURI"
209#define ZED_NonLocalhostAuthority "~NonLocalhostAuthority"
210#define ZED_NonexistentBackRef_3 "~NonexistentBackRef_3"
211#define ZED_NotAllowedForTypeName "~NotAllowedForTypeName"
212#define ZED_NotAmongInScopeSchemaTypes "~NotAmongInScopeSchemaTypes"
213#define ZED_NotDefInDynamicCtx "~NotDefInDynamicCtx"
214#define ZED_NotDocOrElementNode "~NotDocOrElementNode"
215#define ZED_NotInStaticCtx "~NotInStaticCtx"
216#define ZED_NotPlainFile "~NotPlainFile"
217#define ZED_NotSpecified "~NotSpecified"
218#define ZED_OpIsSameNodeMustHaveNodes "~OpIsSameNodeMustHaveNodes"
219#define ZED_OpNodeAfterMustHaveNodes "~OpNodeAfterMustHaveNodes"
220#define ZED_OpNodeBeforeMustHaveNodes "~OpNodeBeforeMustHaveNodes"
221#define ZED_OperationNotDef_23 "~OperationNotDef_23"
222#define ZED_OperationNotPossibleWithTypes_234 "~OperationNotPossibleWithTypes_234"
223#define ZED_ParserInitFailed "~ParserInitFailed"
224#define ZED_ParserNoCreateTree "~ParserNoCreateTree"
225#define ZED_PromotionImpossible "~PromotionImpossible"
226#define ZED_QuotedColon_23 "~QuotedColon_23"
227#define ZED_SEPM0009_Not10 "~SEPM0009_Not10"
228#define ZED_SEPM0009_NotOmit "~SEPM0009_NotOmit"
229#define ZED_SchemaAttributeName "~SchemaAttributeName"
230#define ZED_SchemaElementName "~SchemaElementName"
231#define ZED_SchemaOutOfMemory "~SchemaOutOfMemory"
232#define ZED_SchemaParseError "~SchemaParseError"
233#define ZED_SchemaUnexpected "~SchemaUnexpected"
234#define ZED_SearchKeyTypeMismatch_234 "~SearchKeyTypeMismatch_234"
235#define ZED_SearchKeyTypeNoProbeIndex_23 "~SearchKeyTypeNoProbeIndex_23"
236#define ZED_SeqFnBody "~SeqFnBody"
237#define ZED_SeqNoCastToQName "~SeqNoCastToQName"
238#define ZED_SingletonExpected_2o "~SingletonExpected_2o"
239#define ZED_StackOverflow "~StackOverflow"
240#define ZED_StingLiteral "~StingLiteral"
241#define ZED_StringValue "~StringValue"
242#define ZED_SumImpossibleWithTypes_23 "~SumImpossibleWithTypes_23"
243#define ZED_TrailingChar_3 "~TrailingChar_3"
244#define ZED_TwoDecimalFormatsSameName_2 "~TwoDecimalFormatsSameName_2"
245#define ZED_TwoDefaultDecimalFormats "~TwoDefaultDecimalFormats"
246#define ZED_TypeIsNotSubtype "~TypeIsNotSubtype"
247#define ZED_U_REGEX_BAD_ESCAPE_SEQUENCE "~U_REGEX_BAD_ESCAPE_SEQUENCE"
248#define ZED_U_REGEX_BAD_INTERVAL "~U_REGEX_BAD_INTERVAL"
249#define ZED_U_REGEX_INTERNAL_ERROR "~U_REGEX_INTERNAL_ERROR"
250#define ZED_U_REGEX_INVALID_BACK_REF "~U_REGEX_INVALID_BACK_REF"
251#define ZED_U_REGEX_INVALID_FLAG "~U_REGEX_INVALID_FLAG"
252#define ZED_U_REGEX_INVALID_RANGE "~U_REGEX_INVALID_RANGE"
253#define ZED_U_REGEX_INVALID_STATE "~U_REGEX_INVALID_STATE"
254#define ZED_U_REGEX_LOOK_BEHIND_LIMIT "~U_REGEX_LOOK_BEHIND_LIMIT"
255#define ZED_U_REGEX_MAX_LT_MIN "~U_REGEX_MAX_LT_MIN"
256#define ZED_U_REGEX_MISMATCHED_PAREN "~U_REGEX_MISMATCHED_PAREN"
257#define ZED_U_REGEX_MISSING_CLOSE_BRACKET "~U_REGEX_MISSING_CLOSE_BRACKET"
258#define ZED_U_REGEX_NUMBER_TOO_BIG "~U_REGEX_NUMBER_TOO_BIG"
259#define ZED_U_REGEX_OCTAL_TOO_BIG "~U_REGEX_OCTAL_TOO_BIG"
260#define ZED_U_REGEX_PROPERTY_SYNTAX "~U_REGEX_PROPERTY_SYNTAX"
261#define ZED_U_REGEX_RULE_SYNTAX "~U_REGEX_RULE_SYNTAX"
262#define ZED_U_REGEX_SET_CONTAINS_STRING "~U_REGEX_SET_CONTAINS_STRING"
263#define ZED_U_REGEX_STACK_OVERFLOW "~U_REGEX_STACK_OVERFLOW"
264#define ZED_U_REGEX_STOPPED_BY_CALLER "~U_REGEX_STOPPED_BY_CALLER"
265#define ZED_U_REGEX_TIME_OUT "~U_REGEX_TIME_OUT"
266#define ZED_U_REGEX_UNIMPLEMENTED "~U_REGEX_UNIMPLEMENTED"
267#define ZED_REGEX_UNIMPLEMENTED "~REGEX_UNIMPLEMENTED"
268#define ZED_REGEX_MISMATCHED_PAREN "~REGEX_MISMATCHED_PAREN"
269#define ZED_REGEX_BROKEN_P_CONSTRUCT "~REGEX_BROKEN_P_CONSTRUCT"
270#define ZED_REGEX_UNKNOWN_PL_CONSTRUCT "~REGEX_UNKNOWN_PL_CONSTRUCT"
271#define ZED_REGEX_UNKNOWN_PM_CONSTRUCT "~REGEX_UNKNOWN_PM_CONSTRUCT"
272#define ZED_REGEX_UNKNOWN_PN_CONSTRUCT "~REGEX_UNKNOWN_PN_CONSTRUCT"
273#define ZED_REGEX_UNKNOWN_PP_CONSTRUCT "~REGEX_UNKNOWN_PP_CONSTRUCT"
274#define ZED_REGEX_UNKNOWN_PZ_CONSTRUCT "~REGEX_UNKNOWN_PZ_CONSTRUCT"
275#define ZED_REGEX_UNKNOWN_PS_CONSTRUCT "~REGEX_UNKNOWN_PS_CONSTRUCT"
276#define ZED_REGEX_UNKNOWN_PC_CONSTRUCT "~REGEX_UNKNOWN_PC_CONSTRUCT"
277#define ZED_REGEX_BROKEN_PIs_CONSTRUCT "~REGEX_BROKEN_PIs_CONSTRUCT"
278#define ZED_REGEX_UNKNOWN_PIs_CONSTRUCT "~REGEX_UNKNOWN_PIs_CONSTRUCT"
279#define ZED_REGEX_INVALID_UNICODE_CODEPOINT_u "~REGEX_INVALID_UNICODE_CODEPOINT_u"
280#define ZED_REGEX_UNKNOWN_ESC_CHAR "~REGEX_UNKNOWN_ESC_CHAR"
281#define ZED_REGEX_INVALID_BACK_REF "~REGEX_INVALID_BACK_REF"
282#define ZED_REGEX_INVALID_ATOM_CHAR "~REGEX_INVALID_ATOM_CHAR"
283#define ZED_REGEX_INVALID_SUBCLASS "~REGEX_INVALID_SUBCLASS"
284#define ZED_REGEX_INVALID_USE_OF_SUBCLASS "~REGEX_INVALID_USE_OF_SUBCLASS"
285#define ZED_REGEX_MULTICHAR_IN_CHAR_RANGE "~REGEX_MULTICHAR_IN_CHAR_RANGE"
286#define ZED_REGEX_MISSING_CLOSE_BRACKET "~REGEX_MISSING_CLOSE_BRACKET"
287#define ZED_REGEX_MAX_LT_MIN "~REGEX_MAX_LT_MIN"
288#define ZED_UnaryArithOp "~UnaryArithOp"
289#define ZED_UnbalancedChar_3 "~UnbalancedChar_3"
290#define ZED_UnescapedChar_3 "~UnescapedChar_3"
291#define ZED_UnexpectedElement "~UnexpectedElement"
292#define ZED_VarValMustBeSingleItem_2 "~VarValMustBeSingleItem_2"
293#define ZED_Variable "~Variable"
294#define ZED_VariabledHasNoValue "~VariabledHasNoValue"
295#define ZED_VariabledUndeclared "~VariabledUndeclared"
296#define ZED_XMLSchema "~XMLSchema"
297#define ZED_XUST0002_Transform "~XUST0002_Transform"
298#define ZED_XUST0002_UDF_2 "~XUST0002_UDF_2"
299#define ZED_ZeroLenURI "~ZeroLenURI"
300#define ZED_error "~error"
301#define ZED_format_integer_bad_picture_format "~format_integer_bad_picture_format"
302#define ZED_format_integer_duplicated_optional_format_modifier "~format_integer_duplicated_optional_format_modifier"
303#define ZED_format_integer_optional_format_modifier_not_closed "~format_integer_optional_format_modifier_not_closed"
304#define ZED_format_integer_picture_empty "~format_integer_picture_empty"
305#define ZED_format_integer_unknown_optional_format_modifier_character "~format_integer_unknown_optional_format_modifier_character"
306#define ZED_format_integer_value_1_10 "~format_integer_value_1_10"
307#define ZED_format_integer_value_1_20 "~format_integer_value_1_20"
308#define ZED_format_integer_value_gt_3000 "~format_integer_value_gt_3000"
309#define ZED_warning "~warning"
310#define ZED_xqueryx_empty_content "~xqueryx_empty_content"
311#define ZED_ParseFragmentOptionCombinationNotAllowed "~ParseFragmentOptionCombinationNotAllowed"
312#define ZED_ParseFragmentInvalidOptions "~ParseFragmentInvalidOptions"
313#define ZED_ParseFragmentDoctypeNotAllowed "~ParseFragmentDoctypeNotAllowed"
314#define ZED_ParseFragmentDoctypeNotAllowedHere "~ParseFragmentDoctypeNotAllowedHere"
315#define ZED_FormatNumberDuplicates "~FormatNumberDuplicates"
316#define ZED_FormatNumberGroupingAdjacentToDecimal "~FormatNumberGroupingAdjacentToDecimal"
317#define ZED_FormatNumberIntegerPart "~FormatNumberIntegerPart"
318#define ZED_FormatNumberFractionalPart "~FormatNumberFractionalPart"
319#define ZED_FormatNumberPercentPermille "~FormatNumberPercentPermille"
320#define ZED_FormatNumberAtLeastOneOptionalOrDecimal "~FormatNumberAtLeastOneOptionalOrDecimal"
321#define ZED_JSON_ILLEGAL_CHARACTER "~JSON_ILLEGAL_CHARACTER"
322#define ZED_JSON_ILLEGAL_CODEPOINT "~JSON_ILLEGAL_CODEPOINT"
323#define ZED_JSON_ILLEGAL_ESCAPE "~JSON_ILLEGAL_ESCAPE"
324#define ZED_JSON_ILLEGAL_LITERAL "~JSON_ILLEGAL_LITERAL"
325#define ZED_JSON_ILLEGAL_NUMBER "~JSON_ILLEGAL_NUMBER"
326#define ZED_JSON_UNEXPECTED_TOKEN "~JSON_UNEXPECTED_TOKEN"
327#define ZED_JSON_UNTERMINATED_STRING "~JSON_UNTERMINATED_STRING"
328#define ZED_JSON_UNEXPECTED_EXTRA_CONTENT "~JSON_UNEXPECTED_EXTRA_CONTENT"
329#define ZED_FUNCTION "~FUNCTION"
330#define ZED_ANNOTATION "~ANNOTATION"
331
332#endif /* ZORBA_DIAGNOSTICS_ZED_KEYS */
333/*
334 * Local variables:
335 * mode: c++
336 * End:
337 */
338/* vim:set et sw=2 ts=2: */
0339
=== modified file 'src/runtime/core/apply_updates.cpp'
--- src/runtime/core/apply_updates.cpp 2012-10-08 12:09:36 +0000
+++ src/runtime/core/apply_updates.cpp 2012-11-17 18:50:26 +0000
@@ -38,6 +38,7 @@
38#include "common/shared_types.h"38#include "common/shared_types.h"
3939
40#include "diagnostics/util_macros.h"40#include "diagnostics/util_macros.h"
41#include "zorba/internal/system_diagnostic.h"
4142
4243
43namespace zorba 44namespace zorba
@@ -232,32 +233,27 @@
232 }233 }
233 catch (XQueryException& e)234 catch (XQueryException& e)
234 {235 {
235 if (e.has_source() &&236 if ( e.has_source() ) {
236 (e.diagnostic() == err::XUDY0021 ||237 if ( e.diagnostic() == err::XUDY0021
237 e.diagnostic() == err::XUDY0015 ||238 || e.diagnostic() == err::XUDY0024
238 e.diagnostic() == err::XUDY0016 ||239 || e.diagnostic() == zerr::ZDDY0013_COLLECTION_BAD_DESTROY_INDEXES
239 e.diagnostic() == err::XUDY0017 ||240 || e.diagnostic() == zerr::ZDDY0014_COLLECTION_BAD_DESTROY_ICS
240 e.diagnostic() == err::XUDY0014)) 241 || e.diagnostic() == zerr::ZDDY0028_INDEX_DOMAIN_HAS_DUPLICATE_NODES
241 {242 || e.diagnostic() == zerr::ZSTR0002_INDEX_DOES_NOT_EXIST
242 XQueryException lNewE = 243 )
243 XQUERY_EXCEPTION(err::XUDY0021, ERROR_PARAMS(ZED(XUDY0021_AppliedAt), loc));244 throw XQUERY_EXCEPTION(
244245 err::XUDY0021,
245 QueryLoc lLoc;246 ERROR_PARAMS( e.what(), ZED(XUDY0021_AppliedAt), loc ),
246 lLoc.setFilename(e.source_uri());247 ERROR_LOC( e )
247 lLoc.setLineBegin(e.source_line());248 );
248 lLoc.setColumnBegin(e.source_column());
249 set_source(lNewE, lLoc);
250 lNewE.set_diagnostic(e.diagnostic());
251
252 throw lNewE;
253 }249 }
254 else250 else
255 {251 {
256 // exception raised by the store doesn't have a store location252 // exception raised by the store doesn't have a store location
257 // hence, we add the location of the apply expression253 // hence, we add the location of the apply expression
258 set_source(e, loc);254 set_source(e, loc);
259 throw;
260 }255 }
256 throw;
261 }257 }
262}258}
263259
@@ -265,6 +261,5 @@
265UNARY_ACCEPT(ApplyIterator);261UNARY_ACCEPT(ApplyIterator);
266262
267263
268
269} // namespace zorba264} // namespace zorba
270/* vim:set et sw=2 ts=2: */265/* vim:set et sw=2 ts=2: */
271266
=== modified file 'src/runtime/core/fncall_iterator.cpp'
--- src/runtime/core/fncall_iterator.cpp 2012-10-19 20:42:38 +0000
+++ src/runtime/core/fncall_iterator.cpp 2012-11-17 18:50:26 +0000
@@ -711,7 +711,7 @@
711 throw ZORBA_EXCEPTION(711 throw ZORBA_EXCEPTION(
712 zerr::ZCSE0013_UNABLE_TO_LOAD_QUERY,712 zerr::ZCSE0013_UNABLE_TO_LOAD_QUERY,
713 ERROR_PARAMS(713 ERROR_PARAMS(
714 ZED( NoExternalFunction ),714 ZED( NoExternalFunction_2 ),
715 BUILD_STRING( '{', theNamespace, '}', lLocalname )715 BUILD_STRING( '{', theNamespace, '}', lLocalname )
716 )716 )
717 );717 );
718718
=== modified file 'src/runtime/core/sequencetypes.cpp'
--- src/runtime/core/sequencetypes.cpp 2012-10-24 11:32:56 +0000
+++ src/runtime/core/sequencetypes.cpp 2012-11-17 18:50:26 +0000
@@ -468,7 +468,7 @@
468 assert(theQName != NULL);468 assert(theQName != NULL);
469469
470 RAISE_ERROR(err::XPTY0004, loc, 470 RAISE_ERROR(err::XPTY0004, loc,
471 ERROR_PARAMS(ZED(XPTY0004_FuncReturn),471 ERROR_PARAMS(ZED(XPTY0004_NoReturnTypePromote_234),
472 valueType, targetType, theQName->getStringValue()));472 valueType, targetType, theQName->getStringValue()));
473 break;473 break;
474 }474 }
@@ -477,14 +477,14 @@
477 assert(theQName != NULL);477 assert(theQName != NULL);
478478
479 RAISE_ERROR(err::XPTY0004, loc, 479 RAISE_ERROR(err::XPTY0004, loc,
480 ERROR_PARAMS(ZED(XPTY0004_FuncParam),480 ERROR_PARAMS(ZED(XPTY0004_NoParamTypePromote_234),
481 valueType, targetType, theQName->getStringValue()));481 valueType, targetType, theQName->getStringValue()));
482 break;482 break;
483 }483 }
484 case PROMOTE_TYPE_PROMOTION:484 case PROMOTE_TYPE_PROMOTION:
485 {485 {
486 RAISE_ERROR(err::XPTY0004, loc, 486 RAISE_ERROR(err::XPTY0004, loc,
487 ERROR_PARAMS(ZED(XPTY0004_TypePromotion), valueType, targetType));487 ERROR_PARAMS(ZED(XPTY0004_NoTypePromote_23), valueType, targetType));
488 break;488 break;
489 }489 }
490#ifdef ZORBA_WITH_JSON490#ifdef ZORBA_WITH_JSON
@@ -670,7 +670,7 @@
670 assert(theQName != NULL);670 assert(theQName != NULL);
671671
672 RAISE_ERROR(err::XPTY0004, loc, 672 RAISE_ERROR(err::XPTY0004, loc,
673 ERROR_PARAMS(ZED(XPTY0004_FuncReturn),673 ERROR_PARAMS(ZED(XPTY0004_NoReturnTypePromote_234),
674 valueType, targetType, theQName->getStringValue()));674 valueType, targetType, theQName->getStringValue()));
675 break;675 break;
676 }676 }
@@ -679,14 +679,14 @@
679 assert(theQName != NULL);679 assert(theQName != NULL);
680680
681 RAISE_ERROR(err::XPTY0004, loc, 681 RAISE_ERROR(err::XPTY0004, loc,
682 ERROR_PARAMS(ZED(XPTY0004_FuncParam),682 ERROR_PARAMS(ZED(XPTY0004_NoParamTypePromote_234),
683 valueType, targetType, theQName->getStringValue()));683 valueType, targetType, theQName->getStringValue()));
684 break;684 break;
685 }685 }
686 case TREAT_TYPE_MATCH:686 case TREAT_TYPE_MATCH:
687 {687 {
688 RAISE_ERROR(err::XPTY0004, loc, 688 RAISE_ERROR(err::XPTY0004, loc,
689 ERROR_PARAMS(ZED(XPTY0004_TypeMatch), valueType, targetType));689 ERROR_PARAMS(ZED(XPTY0004_NoTreatAs_23), valueType, targetType));
690 break;690 break;
691 }691 }
692 case TREAT_EXPR:692 case TREAT_EXPR:
@@ -742,8 +742,7 @@
742 }742 }
743 case TREAT_JSONIQ_OBJECT_UPDATE_CONTENT:743 case TREAT_JSONIQ_OBJECT_UPDATE_CONTENT:
744 {744 {
745 RAISE_ERROR(jerr::JNUP0019, loc,745 RAISE_ERROR(jerr::JNUP0019, loc, ERROR_PARAMS(valueType));
746 ERROR_PARAMS(ZED(JNUP0019), valueType));
747 break;746 break;
748 }747 }
749 case TREAT_JSONIQ_ARRAY_UPDATE_TARGET:748 case TREAT_JSONIQ_ARRAY_UPDATE_TARGET:
750749
=== modified file 'src/runtime/function_item/dynamic_fncall_iterator.cpp'
--- src/runtime/function_item/dynamic_fncall_iterator.cpp 2012-09-19 21:16:15 +0000
+++ src/runtime/function_item/dynamic_fncall_iterator.cpp 2012-11-17 18:50:26 +0000
@@ -167,7 +167,7 @@
167 if (!consumeNext(targetItem, theChildren[0], planState))167 if (!consumeNext(targetItem, theChildren[0], planState))
168 {168 {
169 RAISE_ERROR(err::XPTY0004, loc, 169 RAISE_ERROR(err::XPTY0004, loc,
170 ERROR_PARAMS(ZED(XPTY0004_TypePromotion),170 ERROR_PARAMS(ZED(XPTY0004_NoTypePromote_23),
171 "empty-sequence()",171 "empty-sequence()",
172 GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE->toSchemaString()));172 GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE->toSchemaString()));
173 }173 }
@@ -177,7 +177,7 @@
177 if (consumeNext(item, theChildren[0], planState))177 if (consumeNext(item, theChildren[0], planState))
178 {178 {
179 RAISE_ERROR(err::XPTY0004, loc, 179 RAISE_ERROR(err::XPTY0004, loc,
180 ERROR_PARAMS(ZED(XPTY0004_NoMultiSeqTypePromotion),180 ERROR_PARAMS(ZED(XPTY0004_NoMultiSeqTypePromotion_2),
181 GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE->toSchemaString()));181 GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE->toSchemaString()));
182 }182 }
183183
@@ -308,7 +308,7 @@
308 xqtref_t type = tm->create_value_type(targetItem);308 xqtref_t type = tm->create_value_type(targetItem);
309309
310 RAISE_ERROR(err::XPTY0004, loc, 310 RAISE_ERROR(err::XPTY0004, loc,
311 ERROR_PARAMS(ZED(XPTY0004_TypePromotion),311 ERROR_PARAMS(ZED(XPTY0004_NoTypePromote_23),
312 type->toSchemaString(),312 type->toSchemaString(),
313 GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE->toSchemaString()));313 GENV_TYPESYSTEM.ANY_FUNCTION_TYPE_ONE->toSchemaString()));
314 }314 }
315315
=== modified file 'src/runtime/json/jsoniq_functions_impl.cpp'
--- src/runtime/json/jsoniq_functions_impl.cpp 2012-10-24 12:49:43 +0000
+++ src/runtime/json/jsoniq_functions_impl.cpp 2012-11-17 18:50:26 +0000
@@ -1160,7 +1160,7 @@
1160 xqtref_t type = tm->create_value_type(selector, loc);1160 xqtref_t type = tm->create_value_type(selector, loc);
11611161
1162 RAISE_ERROR(err::XPTY0004, loc, 1162 RAISE_ERROR(err::XPTY0004, loc,
1163 ERROR_PARAMS(ZED(XPTY0004_NoTypePromotion_23),1163 ERROR_PARAMS(ZED(XPTY0004_NoTypePromote_23),
1164 type->toSchemaString(),1164 type->toSchemaString(),
1165 GENV_TYPESYSTEM.INTEGER_TYPE_ONE->toSchemaString()));1165 GENV_TYPESYSTEM.INTEGER_TYPE_ONE->toSchemaString()));
1166 }1166 }
@@ -1178,7 +1178,7 @@
1178 xqtref_t type = tm->create_value_type(selector, loc);1178 xqtref_t type = tm->create_value_type(selector, loc);
11791179
1180 RAISE_ERROR(err::XPTY0004, loc, 1180 RAISE_ERROR(err::XPTY0004, loc,
1181 ERROR_PARAMS(ZED(XPTY0004_NoTypePromotion_23),1181 ERROR_PARAMS(ZED(XPTY0004_NoTypePromote_23),
1182 type->toSchemaString(),1182 type->toSchemaString(),
1183 GENV_TYPESYSTEM.STRING_TYPE_ONE->toSchemaString()));1183 GENV_TYPESYSTEM.STRING_TYPE_ONE->toSchemaString()));
1184 }1184 }
11851185
=== modified file 'src/runtime/numerics/numerics_impl.cpp'
--- src/runtime/numerics/numerics_impl.cpp 2012-09-19 21:16:15 +0000
+++ src/runtime/numerics/numerics_impl.cpp 2012-11-17 18:50:26 +0000
@@ -883,7 +883,7 @@
883 if (!isAllowedType(result->getType()))883 if (!isAllowedType(result->getType()))
884 {884 {
885 RAISE_ERROR(err::XPTY0004, info.loc,885 RAISE_ERROR(err::XPTY0004, info.loc,
886 ERROR_PARAMS(ZED(FormatNumber_2), result->getType()->getStringValue()));886 ERROR_PARAMS(ZED(XPTY0004_FormatNumber_2), result->getType()->getStringValue()));
887 }887 }
888888
889 consumeNext(pictureItem, theChildren[1].getp(), planState);889 consumeNext(pictureItem, theChildren[1].getp(), planState);
890890
=== modified file 'src/store/naive/node_items.cpp'
--- src/store/naive/node_items.cpp 2012-10-12 09:05:54 +0000
+++ src/store/naive/node_items.cpp 2012-11-17 18:50:26 +0000
@@ -3224,7 +3224,8 @@
32243224
3225 if (!otherAttr->isHidden() && otherAttr->getNodeName()->equals(attrName))3225 if (!otherAttr->isHidden() && otherAttr->getNodeName()->equals(attrName))
3226 {3226 {
3227 throw XQUERY_EXCEPTION(err::XUDY0021, ERROR_PARAMS(attrName->getStringValue()));3227 throw XQUERY_EXCEPTION(err::XUDY0021,
3228 ERROR_PARAMS(ZED(XUDY0021_AttributeName), "", attrName->getStringValue()));
3228 }3229 }
3229 }3230 }
3230 }3231 }
32313232
=== modified file 'src/store/naive/pul_primitives.cpp'
--- src/store/naive/pul_primitives.cpp 2012-09-19 21:16:15 +0000
+++ src/store/naive/pul_primitives.cpp 2012-11-17 18:50:26 +0000
@@ -314,7 +314,14 @@
314void UpdInsertAttributes::apply()314void UpdInsertAttributes::apply()
315{315{
316 theIsApplied = true;316 theIsApplied = true;
317 ELEM_NODE(theTarget)->insertAttributes(*this);317 try
318 {
319 ELEM_NODE(theTarget)->insertAttributes(*this);
320 } catch (ZorbaException& e)
321 {
322 set_source(e, *theLoc);
323 throw;
324 }
318}325}
319326
320327
@@ -364,8 +371,15 @@
364371
365void UpdReplaceAttribute::apply()372void UpdReplaceAttribute::apply()
366{373{
367 theIsApplied = true;374 try
368 ELEM_NODE(theTarget)->replaceAttribute(*this);375 {
376 ELEM_NODE(theTarget)->replaceAttribute(*this);
377 theIsApplied = true;
378 } catch (ZorbaException& e)
379 {
380 set_source(e, *theLoc);
381 throw;
382 }
369}383}
370384
371385
@@ -463,8 +477,15 @@
463********************************************************************************/477********************************************************************************/
464void UpdRenameElem::apply()478void UpdRenameElem::apply()
465{479{
466 ELEM_NODE(theTarget)->replaceName(*this);480 try
467 theIsApplied = true;481 {
482 ELEM_NODE(theTarget)->replaceName(*this);
483 theIsApplied = true;
484 } catch (ZorbaException& e)
485 {
486 set_source(e, *theLoc);
487 throw;
488 }
468}489}
469490
470491
@@ -612,8 +633,15 @@
612********************************************************************************/633********************************************************************************/
613void UpdRenameAttr::apply()634void UpdRenameAttr::apply()
614{635{
615 ATTR_NODE(theTarget)->replaceName(*this);636 try
616 theIsApplied = true;637 {
638 ATTR_NODE(theTarget)->replaceName(*this);
639 theIsApplied = true;
640 } catch (ZorbaException& e)
641 {
642 set_source(e, *theLoc);
643 throw;
644 }
617}645}
618646
619647
620648
=== modified file 'src/util/error_util.cpp'
--- src/util/error_util.cpp 2012-09-19 21:16:15 +0000
+++ src/util/error_util.cpp 2012-11-17 18:50:26 +0000
@@ -61,7 +61,7 @@
61 if ( function && *function ) {61 if ( function && *function ) {
62 using namespace internal::diagnostic;62 using namespace internal::diagnostic;
63 parameters::value_type result =63 parameters::value_type result =
64 diagnostic::dict::lookup( ZED( FunctionFailed_12o ) );64 diagnostic::dict::lookup( ZED( FunctionFailed_23o ) );
65 parameters const params( ERROR_PARAMS( function, err_string ) );65 parameters const params( ERROR_PARAMS( function, err_string ) );
66 params.substitute( &result );66 params.substitute( &result );
67 return result;67 return result;
@@ -77,7 +77,7 @@
77 parameters::value_type result;77 parameters::value_type result;
78 if ( function && *function ) {78 if ( function && *function ) {
79 result = diagnostic::dict::lookup(79 result = diagnostic::dict::lookup(
80 ZED( FunctionFailedErrorCodeMessage_123 )80 ZED( FunctionFailedErrorCodeMessage_234 )
81 );81 );
82 params = ERROR_PARAMS( function, code, err_string );82 params = ERROR_PARAMS( function, code, err_string );
83 } else {83 } else {
8484
=== modified file 'test/rbkt/ExpQueryResults/zorba/index/auctions2u.xml.res'
--- test/rbkt/ExpQueryResults/zorba/index/auctions2u.xml.res 2012-07-03 03:12:05 +0000
+++ test/rbkt/ExpQueryResults/zorba/index/auctions2u.xml.res 2012-11-17 18:50:26 +0000
@@ -256,7 +256,7 @@
256256
257TEST 6 (undo without do):257TEST 6 (undo without do):
258258
259<exception>err:XUDY0021 : updates violate constraint</exception><person id="person1"><watches>259<exception>err:XUDY0021 : "id": attribute with the same name already exists</exception><person id="person1"><watches>
260<watch open_auction="open_auction2"/>260<watch open_auction="open_auction2"/>
261<watch open_auction="open_auction4"/>261<watch open_auction="open_auction4"/>
262<watch open_auction="open_auction5"/>262<watch open_auction="open_auction5"/>
263263
=== modified file 'test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_06.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_06.xml.res 2012-09-11 15:38:58 +0000
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_06.xml.res 2012-11-17 18:50:26 +0000
@@ -1,1 +1,1 @@
1Cannot atomize an object item. An object has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item).1can not atomize an object item: an object has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item)
22
=== modified file 'test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_10.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_10.xml.res 2012-09-11 15:38:58 +0000
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/obj_constr_10.xml.res 2012-11-17 18:50:26 +0000
@@ -1,1 +1,1 @@
1Cannot atomize an array item. An array has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item).1can not atomize an array item: an array has probably been passed where an atomic value is expected (e.g., as a key, or to a function expecting an atomic item)
22
=== modified file 'test/rbkt/ExpQueryResults/zorba/jsoniq/serializer-JNSE0022.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/serializer-JNSE0022.xml.res 2012-09-13 12:51:41 +0000
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/serializer-JNSE0022.xml.res 2012-11-17 18:50:26 +0000
@@ -1,1 +1,1 @@
1html: invalid serialization method for item type (js:object) text: invalid serialization method for item type (js:object) xml: invalid serialization method for item type (js:object) xhtml: invalid serialization method for item type (js:object)1"html": invalid serialization method for item type (js:object) "text": invalid serialization method for item type (js:object) "xml": invalid serialization method for item type (js:object) "xhtml": invalid serialization method for item type (js:object)
22
=== modified file 'test/rbkt/Queries/zorba/index/auctions2u.xq'
--- test/rbkt/Queries/zorba/index/auctions2u.xq 2012-07-03 03:12:05 +0000
+++ test/rbkt/Queries/zorba/index/auctions2u.xq 2012-11-17 18:50:26 +0000
@@ -162,7 +162,7 @@
162 }}162 }}
163 catch *163 catch *
164 {164 {
165 <exception>{$err:code} : {$err:description}</exception>165 <exception>{$err:code} : {substring-before($err:description, " (applied")}</exception>
166 }166 }
167 ,167 ,
168 for $x in auctions:probe-point-watch($auctions:PersonWatches,168 for $x in auctions:probe-point-watch($auctions:PersonWatches,

Subscribers

People subscribed via source and target branches