zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #14667
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
Till Westmann has proposed merging lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba.
Commit message:
s/JNTY0003/JNTY0024/
s/JSDY0040/JNDY0040/
s/JSDY0020/JNTY0020/
s/JSDY0021/JNDY0021/
doc fixes for jn:parse-json
Requested reviews:
Ghislain Fourny (gislenius)
Till Westmann (tillw)
Related bugs:
Bug #1055596 in Zorba: "rename JNTY0003 to JNTY0024"
https://bugs.launchpad.net/zorba/+bug/1055596
Bug #1055599 in Zorba: "rename JSDY0020 to JNTY0020"
https://bugs.launchpad.net/zorba/+bug/1055599
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/jsoniq-error-code-fixes/+merge/126060
s/JNTY0003/JNTY0024/
s/JSDY0040/JNDY0040/
s/JSDY0020/JNTY0020/
s/JSDY0021/JNDY0021/
doc fixes for jn:parse-json
--
https://code.launchpad.net/~zorba-coders/zorba/jsoniq-error-code-fixes/+merge/126060
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h 2012-09-20 18:20:33 +0000
+++ include/zorba/pregenerated/diagnostic_list.h 2012-09-24 17:23:49 +0000
@@ -851,13 +851,13 @@
extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0023;
-extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0003;
-
-extern ZORBA_DLL_PUBLIC JSONiqErrorCode JSDY0040;
-
-extern ZORBA_DLL_PUBLIC JSONiqErrorCode JSDY0020;
-
-extern ZORBA_DLL_PUBLIC JSONiqErrorCode JSDY0021;
+extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0024;
+
+extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNDY0040;
+
+extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0020;
+
+extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNDY0021;
#endif
} // namespace jerr
=== modified file 'modules/org/jsoniq/www/functions.xq'
--- modules/org/jsoniq/www/functions.xq 2012-09-21 18:25:49 +0000
+++ modules/org/jsoniq/www/functions.xq 2012-09-24 17:23:49 +0000
@@ -157,7 +157,7 @@
:
: @return A sequence of JSON Object or Array item.
:
- : @error jerr:JSDY0040 if the given string is not valid JSON.
+ : @error jerr:JNDY0040 if the given string is not valid JSON.
:)
declare function jn:parse-json($j as xs:string?) as json-item()* external;
@@ -172,10 +172,10 @@
: <li>jsoniq-multiple-top-level-items: allow parsing of sequences of JSON Objects and Arrays (boolean; default: true)</li>
: </ul>
:
- : @error jerr:JSDY0040 if the given string is not valid JSON or
- : if jsoniq-multiple-top-level-items is false and there is additionalx
+ : @error jerr:JNDY0040 if the given string is not valid JSON or
+ : if jsoniq-multiple-top-level-items is false and there is additional
: content after the first JSON Object or Array.
- : @error jerr:JSDY0041 if the value for the option
+ : @error jerr:JNTY0020 if the value for the option
: jsoniq-multiple-top-level-items is not of type xs:boolean.
:
: @return a sequence of JSON Object or Array item.
=== modified file 'modules/org/jsoniq/www/pregenerated/errors.xq'
--- modules/org/jsoniq/www/pregenerated/errors.xq 2012-09-20 19:24:53 +0000
+++ modules/org/jsoniq/www/pregenerated/errors.xq 2012-09-24 17:23:49 +0000
@@ -141,19 +141,19 @@
(:~
:objects or arrays don't have a string value
:)
-declare variable $jerr:JNTY0003 as xs:QName := fn:QName($jerr:NS, "jerr:JNTY0003");
+declare variable $jerr:JNTY0024 as xs:QName := fn:QName($jerr:NS, "jerr:JNTY0024");
(:~
:parser errors raised by the JSONIQLoader
:)
-declare variable $jerr:JSDY0040 as xs:QName := fn:QName($jerr:NS, "jerr:JSDY0040");
+declare variable $jerr:JNDY0040 as xs:QName := fn:QName($jerr:NS, "jerr:JNDY0040");
(:~
:parser error for invalid option type
:)
-declare variable $jerr:JSDY0020 as xs:QName := fn:QName($jerr:NS, "jerr:JSDY0020");
+declare variable $jerr:JNTY0020 as xs:QName := fn:QName($jerr:NS, "jerr:JNTY0020");
(:~
:parser error raised by jn:parse-json
:)
-declare variable $jerr:JSDY0021 as xs:QName := fn:QName($jerr:NS, "jerr:JSDY0021");
\ No newline at end of file
+declare variable $jerr:JNDY0021 as xs:QName := fn:QName($jerr:NS, "jerr:JNDY0021");
\ No newline at end of file
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2012-09-21 07:02:07 +0000
+++ src/diagnostics/diagnostic_en.xml 2012-09-24 17:23:49 +0000
@@ -2706,24 +2706,22 @@
<!--////////// JSONIQ ///////////////////////////////////////////-->
- <diagnostic code="JNTY0003" if="defined(ZORBA_WITH_JSON)">
+ <diagnostic code="JNTY0024" if="defined(ZORBA_WITH_JSON)">
<comment>objects or arrays don't have a string value</comment>
-
<value>$1 items do not have string value</value>
</diagnostic>
- <diagnostic code="JSDY0040" if="defined(ZORBA_WITH_JSON)">
+ <diagnostic code="JNDY0040" if="defined(ZORBA_WITH_JSON)">
<comment>parser errors raised by the JSONIQLoader</comment>
<value>$1</value>
</diagnostic>
- <diagnostic code="JSDY0020" if="defined(ZORBA_WITH_JSON)">
+ <diagnostic code="JNTY0020" if="defined(ZORBA_WITH_JSON)">
<comment>parser error for invalid option type</comment>
<value>$1: invalid option type for option $2 (expected $3)</value>
</diagnostic>
-
- <diagnostic code="JSDY0021" if="defined(ZORBA_WITH_JSON)">
+ <diagnostic code="JNDY0021" if="defined(ZORBA_WITH_JSON)">
<comment>parser error raised by jn:parse-json</comment>
<value>$1</value>
</diagnostic>
=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp 2012-09-20 18:20:33 +0000
+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2012-09-24 17:23:49 +0000
@@ -1252,16 +1252,16 @@
JSONiqErrorCode JNTY0023( "JNTY0023" );
-JSONiqErrorCode JNTY0003( "JNTY0003" );
-
-
-JSONiqErrorCode JSDY0040( "JSDY0040" );
-
-
-JSONiqErrorCode JSDY0020( "JSDY0020" );
-
-
-JSONiqErrorCode JSDY0021( "JSDY0021" );
+JSONiqErrorCode JNTY0024( "JNTY0024" );
+
+
+JSONiqErrorCode JNDY0040( "JNDY0040" );
+
+
+JSONiqErrorCode JNTY0020( "JNTY0020" );
+
+
+JSONiqErrorCode JNDY0021( "JNDY0021" );
#endif
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2012-09-21 07:02:07 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2012-09-24 17:23:49 +0000
@@ -101,6 +101,12 @@
{ "JNDY0003", "\"$1\": pair with the same name already exists in object." },
#endif
#if defined(ZORBA_WITH_JSON)
+ { "JNDY0021", "$1" },
+#endif
+#if defined(ZORBA_WITH_JSON)
+ { "JNDY0040", "$1" },
+#endif
+#if defined(ZORBA_WITH_JSON)
{ "JNSE0012", "can not serialize multiple top-level items as JSON" },
#endif
#if defined(ZORBA_WITH_JSON)
@@ -113,9 +119,6 @@
{ "JNTY0002", "Pair value returns no, or more than one, item." },
#endif
#if defined(ZORBA_WITH_JSON)
- { "JNTY0003", "$1 items do not have string value" },
-#endif
-#if defined(ZORBA_WITH_JSON)
{ "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)." },
#endif
#if defined(ZORBA_WITH_JSON)
@@ -125,9 +128,15 @@
{ "JNTY0018", "Object or array selection needs exactly one parameter." },
#endif
#if defined(ZORBA_WITH_JSON)
+ { "JNTY0020", "$1: invalid option type for option $2 (expected $3)" },
+#endif
+#if defined(ZORBA_WITH_JSON)
{ "JNTY0023", "$1: value of \"$2\" is not a $3" },
#endif
#if defined(ZORBA_WITH_JSON)
+ { "JNTY0024", "$1 items do not have string value" },
+#endif
+#if defined(ZORBA_WITH_JSON)
{ "JNUP0005", "\"$1\": duplicate pair to insert" },
#endif
#if defined(ZORBA_WITH_JSON)
@@ -154,15 +163,6 @@
#if defined(ZORBA_WITH_JSON)
{ "JNUP0019", "The content of an insert expression must evaluate to a sequence of objects." },
#endif
-#if defined(ZORBA_WITH_JSON)
- { "JSDY0020", "$1: invalid option type for option $2 (expected $3)" },
-#endif
-#if defined(ZORBA_WITH_JSON)
- { "JSDY0021", "$1" },
-#endif
-#if defined(ZORBA_WITH_JSON)
- { "JSDY0040", "$1" },
-#endif
{ "SENR0001", "\"$1\": can not serialize $2" },
{ "SEPM0004", "doctype-system parameter, or standalone parameter with a value other than \"omit\", specified" },
{ "SEPM0009", "omit-xml-declaration parameter is \"yes\" and $1" },
=== modified file 'src/runtime/json/jsoniq_functions_impl.cpp'
--- src/runtime/json/jsoniq_functions_impl.cpp 2012-09-21 18:25:49 +0000
+++ src/runtime/json/jsoniq_functions_impl.cpp 2012-09-24 17:23:49 +0000
@@ -669,7 +669,7 @@
{
const TypeManager* tm = theSctx->get_typemanager();
xqtref_t lType = tm->create_value_type(lOptionValue, loc);
- RAISE_ERROR(jerr::JSDY0020, loc,
+ RAISE_ERROR(jerr::JNTY0020, loc,
ERROR_PARAMS(lType->toSchemaString(), s, "xs:boolean"));
}
aAllowMultiple = lOptionValue->getBooleanValue();
@@ -727,9 +727,9 @@
}
catch (zorba::XQueryException& e)
{
- // rethrow with JSDY0021
+ // rethrow with JNDY0021
XQueryException xq = XQUERY_EXCEPTION(
- jerr::JSDY0021,
+ jerr::JNDY0021,
ERROR_PARAMS(e.what()),
ERROR_LOC(loc));
@@ -742,7 +742,7 @@
{
if (!state->theAllowMultiple && state->theGotOne)
{
- RAISE_ERROR(jerr::JSDY0021, loc,
+ RAISE_ERROR(jerr::JNDY0021, loc,
ERROR_PARAMS(ZED(JSON_UNEXPECTED_EXTRA_CONTENT)));
}
state->theGotOne = true;
=== modified file 'src/store/naive/json_items.cpp'
--- src/store/naive/json_items.cpp 2012-09-24 16:09:47 +0000
+++ src/store/naive/json_items.cpp 2012-09-24 17:23:49 +0000
@@ -523,7 +523,7 @@
zstring SimpleJSONObject::getStringValue() const
{
ASSERT_INVARIANT();
- throw ZORBA_EXCEPTION(jerr::JNTY0003, ERROR_PARAMS("object"));
+ throw ZORBA_EXCEPTION(jerr::JNTY0024, ERROR_PARAMS("object"));
}
@@ -1080,7 +1080,7 @@
zstring SimpleJSONArray::getStringValue() const
{
ASSERT_INVARIANT();
- throw ZORBA_EXCEPTION(jerr::JNTY0003, ERROR_PARAMS("array"));
+ throw ZORBA_EXCEPTION(jerr::JNTY0024, ERROR_PARAMS("array"));
}
=== modified file 'src/store/naive/json_loader.cpp'
--- src/store/naive/json_loader.cpp 2012-09-17 00:36:37 +0000
+++ src/store/naive/json_loader.cpp 2012-09-24 17:23:49 +0000
@@ -57,7 +57,7 @@
if (theRelativeLoc) \
{ \
throw XQUERY_EXCEPTION( \
- jerr::JSDY0040, \
+ jerr::JNDY0040, \
ERROR_PARAMS( \
ZED(msg), \
"" \
@@ -68,7 +68,7 @@
else \
{ \
throw ZORBA_EXCEPTION( \
- jerr::JSDY0040, \
+ jerr::JNDY0040, \
ERROR_PARAMS( \
ZED(msg), \
BUILD_STRING(e.get_loc().line(), ", ", e.get_loc().column()) \
@@ -80,7 +80,7 @@
if (theRelativeLoc) \
{ \
throw XQUERY_EXCEPTION( \
- jerr::JSDY0040, \
+ jerr::JNDY0040, \
ERROR_PARAMS( \
ZED(msg), \
param, \
@@ -92,7 +92,7 @@
else \
{ \
throw ZORBA_EXCEPTION( \
- jerr::JSDY0040, \
+ jerr::JNDY0040, \
ERROR_PARAMS( \
ZED(msg), \
param, \
=== modified file 'test/rbkt/Queries/zorba/jsoniq/parse_json-02.spec'
--- test/rbkt/Queries/zorba/jsoniq/parse_json-02.spec 2012-09-10 16:37:03 +0000
+++ test/rbkt/Queries/zorba/jsoniq/parse_json-02.spec 2012-09-24 17:23:49 +0000
@@ -1,1 +1,1 @@
-Error: http://www.jsoniq.org/errors:JSDY0021
+Error: http://www.jsoniq.org/errors:JNDY0021
=== modified file 'test/rbkt/Queries/zorba/jsoniq/parse_json-02.xq'
--- test/rbkt/Queries/zorba/jsoniq/parse_json-02.xq 2012-09-10 16:37:03 +0000
+++ test/rbkt/Queries/zorba/jsoniq/parse_json-02.xq 2012-09-24 17:23:49 +0000
@@ -1,2 +1,2 @@
-(: test for jerr:JSDY0021 because multiple top-level items are not allowed :)
+(: test for jerr:JNDY0021 because multiple top-level items are not allowed :)
jn:parse-json('{ "a" : true }{ "b" : false }', { "jsoniq-multiple-top-level-items" : false })
=== modified file 'test/rbkt/Queries/zorba/jsoniq/parse_json-03.spec'
--- test/rbkt/Queries/zorba/jsoniq/parse_json-03.spec 2012-09-10 16:37:03 +0000
+++ test/rbkt/Queries/zorba/jsoniq/parse_json-03.spec 2012-09-24 17:23:49 +0000
@@ -1,1 +1,1 @@
-Error: http://www.jsoniq.org/errors:JSDY0021
+Error: http://www.jsoniq.org/errors:JNDY0021
=== modified file 'test/rbkt/Queries/zorba/jsoniq/parse_json-03.xq'
--- test/rbkt/Queries/zorba/jsoniq/parse_json-03.xq 2012-09-10 16:37:03 +0000
+++ test/rbkt/Queries/zorba/jsoniq/parse_json-03.xq 2012-09-24 17:23:49 +0000
@@ -1,2 +1,2 @@
-(: test for parser error jerr:JSDY0021 :)
+(: test for parser error jerr:JNDY0021 :)
jn:parse-json('"a" : true }{ "b" : false }')
=== modified file 'test/rbkt/Queries/zorba/jsoniq/parse_json-04.spec'
--- test/rbkt/Queries/zorba/jsoniq/parse_json-04.spec 2012-09-10 16:37:03 +0000
+++ test/rbkt/Queries/zorba/jsoniq/parse_json-04.spec 2012-09-24 17:23:49 +0000
@@ -1,1 +1,1 @@
-Error: http://www.jsoniq.org/errors:JSDY0020
+Error: http://www.jsoniq.org/errors:JNTY0020
=== modified file 'test/rbkt/Queries/zorba/jsoniq/parse_json-04.xq'
--- test/rbkt/Queries/zorba/jsoniq/parse_json-04.xq 2012-09-10 16:37:03 +0000
+++ test/rbkt/Queries/zorba/jsoniq/parse_json-04.xq 2012-09-24 17:23:49 +0000
@@ -1,2 +1,2 @@
-(: test for invalid type (jerr:JSDY0020) of jsoniq-multiple-top-level-items option :)
+(: test for invalid type (jerr:JNTY0020) of jsoniq-multiple-top-level-items option :)
jn:parse-json('{ "a" : true }{ "b" : false }', { "jsoniq-multiple-top-level-items" : 1 })
Follow ups
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: noreply, 2012-09-26
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-26
-
Re: [Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Ghislain Fourny, 2012-09-26
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-26
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Till Westmann, 2012-09-26
-
Re: [Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Ghislain Fourny, 2012-09-26
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-25
-
Re: [Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-25
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-25
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-25
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Till Westmann, 2012-09-25
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Till Westmann, 2012-09-25
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Till Westmann, 2012-09-25
-
Re: [Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Ghislain Fourny, 2012-09-25
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-24
-
Re: [Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-24
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-24
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Zorba Build Bot, 2012-09-24
-
[Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Till Westmann, 2012-09-24
-
Re: [Merge] lp:~zorba-coders/zorba/jsoniq-error-code-fixes into lp:zorba
From: Till Westmann, 2012-09-24