Merge lp:~paul-lucas/zorba/bug-1108515 into lp:zorba
- bug-1108515
- Merge into trunk
Proposed by
Paul J. Lucas
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Matthias Brantner | ||||
Approved revision: | 11218 | ||||
Merged at revision: | 11217 | ||||
Proposed branch: | lp:~paul-lucas/zorba/bug-1108515 | ||||
Merge into: | lp:zorba | ||||
Diff against target: |
363 lines (+119/-46) 7 files modified
src/diagnostics/diagnostic_en.xml (+7/-1) src/diagnostics/pregenerated/dict_en.cpp (+3/-1) src/diagnostics/pregenerated/dict_zed_keys.h (+2/-0) src/store/naive/json_items.cpp (+5/-3) src/store/naive/pul_primitives.cpp (+28/-12) src/store/naive/simple_lazy_temp_seq.cpp (+45/-17) src/store/naive/simple_temp_seq.cpp (+29/-12) |
||||
To merge this branch: | bzr merge lp:~paul-lucas/zorba/bug-1108515 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthias Brantner | Approve | ||
Paul J. Lucas | Approve | ||
Review via email: mp+146316@code.launchpad.net |
Commit message
Fixed incorrect error reporting
Description of the change
Fixed incorrect error reporting
To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) : | # |
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-1108515-2013-02-
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: 1 Approve.
lp:~paul-lucas/zorba/bug-1108515
updated
- 11218. By Paul J. Lucas
-
Tweaked braces to make Markos happy.
Revision history for this message
Matthias Brantner (matthias-brantner) : | # |
review:
Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job bug-1108515-2013-02-
All tests succeeded!
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/diagnostics/diagnostic_en.xml' | |||
2 | --- src/diagnostics/diagnostic_en.xml 2013-01-30 15:19:38 +0000 | |||
3 | +++ src/diagnostics/diagnostic_en.xml 2013-02-04 00:33:24 +0000 | |||
4 | @@ -2735,7 +2735,13 @@ | |||
5 | 2735 | </diagnostic> | 2735 | </diagnostic> |
6 | 2736 | 2736 | ||
7 | 2737 | <diagnostic code="ZSTR0060" name="RANGE_EXCEPTION"> | 2737 | <diagnostic code="ZSTR0060" name="RANGE_EXCEPTION"> |
9 | 2738 | <value>out of range: $1</value> | 2738 | <value>"$1": value out of range${ 2}</value> |
10 | 2739 | <entry key="ForCollection_3"> | ||
11 | 2740 | <value>for collection "$3"</value> | ||
12 | 2741 | </entry> | ||
13 | 2742 | <entry key="ForSequence"> | ||
14 | 2743 | <value>for sequence</value> | ||
15 | 2744 | </entry> | ||
16 | 2739 | </diagnostic> | 2745 | </diagnostic> |
17 | 2740 | 2746 | ||
18 | 2741 | <diagnostic code="ZSTR0065" name="STRINGS_IN_POOL"> | 2747 | <diagnostic code="ZSTR0065" name="STRINGS_IN_POOL"> |
19 | 2742 | 2748 | ||
20 | === modified file 'src/diagnostics/pregenerated/dict_en.cpp' | |||
21 | --- src/diagnostics/pregenerated/dict_en.cpp 2013-01-30 16:43:55 +0000 | |||
22 | +++ src/diagnostics/pregenerated/dict_en.cpp 2013-02-04 00:33:24 +0000 | |||
23 | @@ -469,7 +469,7 @@ | |||
24 | 469 | { "ZSTR0045", "duplicate node found in sequence" }, | 469 | { "ZSTR0045", "duplicate node found in sequence" }, |
25 | 470 | { "ZSTR0050", "\"$1\" not implemented for item type \"$2\"" }, | 470 | { "ZSTR0050", "\"$1\" not implemented for item type \"$2\"" }, |
26 | 471 | { "ZSTR0055", "streamable string has already been consumed" }, | 471 | { "ZSTR0055", "streamable string has already been consumed" }, |
28 | 472 | { "ZSTR0060", "out of range: $1" }, | 472 | { "ZSTR0060", "\"$1\": value out of range${ 2}" }, |
29 | 473 | { "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." }, | 473 | { "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." }, |
30 | 474 | { "ZSTR0066", "$1: does not reference a node in collection $2" }, | 474 | { "ZSTR0066", "$1: does not reference a node in collection $2" }, |
31 | 475 | { "ZWST0002", "\"$1\": unknown or unsupported annotation" }, | 475 | { "ZWST0002", "\"$1\": unknown or unsupported annotation" }, |
32 | @@ -935,6 +935,8 @@ | |||
33 | 935 | { "~ZDST0027_NO_KEY_TYPE_DECL", "value index missing key type declaration" }, | 935 | { "~ZDST0027_NO_KEY_TYPE_DECL", "value index missing key type declaration" }, |
34 | 936 | { "~ZDST0060_unknown_localname", "unknown localname ($3)" }, | 936 | { "~ZDST0060_unknown_localname", "unknown localname ($3)" }, |
35 | 937 | { "~ZDST0060_unknown_namespace", "unknown namespace ($3)" }, | 937 | { "~ZDST0060_unknown_namespace", "unknown namespace ($3)" }, |
36 | 938 | { "~ZSTR0060_ForCollection_3", "for collection \"$3\"" }, | ||
37 | 939 | { "~ZSTR0060_ForSequence", "for sequence" }, | ||
38 | 938 | { "~ZWST0005_PARAM_TYPE", "type of parameter $3 is $4 which is not a subtype of xs:anyAtomicType" }, | 940 | { "~ZWST0005_PARAM_TYPE", "type of parameter $3 is $4 which is not a subtype of xs:anyAtomicType" }, |
39 | 939 | { "~ZWST0005_RETURN_TYPE", "return type ($3) is not subtype of xs:anyAtomicType" }, | 941 | { "~ZWST0005_RETURN_TYPE", "return type ($3) is not subtype of xs:anyAtomicType" }, |
40 | 940 | { "~ZWST0005_UPDATING", "function is updating" }, | 942 | { "~ZWST0005_UPDATING", "function is updating" }, |
41 | 941 | 943 | ||
42 | === modified file 'src/diagnostics/pregenerated/dict_zed_keys.h' | |||
43 | --- src/diagnostics/pregenerated/dict_zed_keys.h 2013-01-23 17:24:44 +0000 | |||
44 | +++ src/diagnostics/pregenerated/dict_zed_keys.h 2013-02-04 00:33:24 +0000 | |||
45 | @@ -90,6 +90,8 @@ | |||
46 | 90 | #define ZED_ZDST0027_NON_ORDERED_KEY_TYPE "~ZDST0027_NON_ORDERED_KEY_TYPE" | 90 | #define ZED_ZDST0027_NON_ORDERED_KEY_TYPE "~ZDST0027_NON_ORDERED_KEY_TYPE" |
47 | 91 | #define ZED_ZDST0060_unknown_namespace "~ZDST0060_unknown_namespace" | 91 | #define ZED_ZDST0060_unknown_namespace "~ZDST0060_unknown_namespace" |
48 | 92 | #define ZED_ZDST0060_unknown_localname "~ZDST0060_unknown_localname" | 92 | #define ZED_ZDST0060_unknown_localname "~ZDST0060_unknown_localname" |
49 | 93 | #define ZED_ZSTR0060_ForCollection_3 "~ZSTR0060_ForCollection_3" | ||
50 | 94 | #define ZED_ZSTR0060_ForSequence "~ZSTR0060_ForSequence" | ||
51 | 93 | #define ZED_JNUP0007_Object "~JNUP0007_Object" | 95 | #define ZED_JNUP0007_Object "~JNUP0007_Object" |
52 | 94 | #define ZED_JNUP0007_Array "~JNUP0007_Array" | 96 | #define ZED_JNUP0007_Array "~JNUP0007_Array" |
53 | 95 | #define ZED_JNUP0007_ObjectArray "~JNUP0007_ObjectArray" | 97 | #define ZED_JNUP0007_ObjectArray "~JNUP0007_ObjectArray" |
54 | 96 | 98 | ||
55 | === modified file 'src/store/naive/json_items.cpp' | |||
56 | --- src/store/naive/json_items.cpp 2013-01-08 05:02:54 +0000 | |||
57 | +++ src/store/naive/json_items.cpp 2013-02-04 00:33:24 +0000 | |||
58 | @@ -1014,10 +1014,12 @@ | |||
59 | 1014 | { | 1014 | { |
60 | 1015 | return to_xs_unsignedLong(i); | 1015 | return to_xs_unsignedLong(i); |
61 | 1016 | } | 1016 | } |
63 | 1017 | catch (std::range_error& e) | 1017 | catch (std::range_error const&) |
64 | 1018 | { | 1018 | { |
67 | 1019 | throw ZORBA_EXCEPTION(zerr::ZSTR0060_RANGE_EXCEPTION, | 1019 | throw ZORBA_EXCEPTION( |
68 | 1020 | ERROR_PARAMS(BUILD_STRING("access out of bounds " << e.what() << ")"))); | 1020 | zerr::ZSTR0060_RANGE_EXCEPTION, |
69 | 1021 | ERROR_PARAMS( i ) | ||
70 | 1022 | ); | ||
71 | 1021 | } | 1023 | } |
72 | 1022 | } | 1024 | } |
73 | 1023 | 1025 | ||
74 | 1024 | 1026 | ||
75 | === modified file 'src/store/naive/pul_primitives.cpp' | |||
76 | --- src/store/naive/pul_primitives.cpp 2013-01-22 11:07:53 +0000 | |||
77 | +++ src/store/naive/pul_primitives.cpp 2013-02-04 00:33:24 +0000 | |||
78 | @@ -1024,11 +1024,15 @@ | |||
79 | 1024 | { | 1024 | { |
80 | 1025 | size = to_xs_unsignedLong(collection->size()); | 1025 | size = to_xs_unsignedLong(collection->size()); |
81 | 1026 | } | 1026 | } |
83 | 1027 | catch (std::range_error& e) | 1027 | catch (std::range_error const&) |
84 | 1028 | { | 1028 | { |
85 | 1029 | RAISE_ERROR(zerr::ZSTR0060_RANGE_EXCEPTION, theLoc, | 1029 | RAISE_ERROR(zerr::ZSTR0060_RANGE_EXCEPTION, theLoc, |
88 | 1030 | ERROR_PARAMS(BUILD_STRING("collection too big (" | 1030 | ERROR_PARAMS( |
89 | 1031 | << e.what() << "; " << theName << ")"))); | 1031 | collection->size(), |
90 | 1032 | ZED( ZSTR0060_ForCollection_3 ), | ||
91 | 1033 | theName | ||
92 | 1034 | ) | ||
93 | 1035 | ); | ||
94 | 1032 | } | 1036 | } |
95 | 1033 | 1037 | ||
96 | 1034 | for (uint64_t i = 0; i < size; ++i) | 1038 | for (uint64_t i = 0; i < size; ++i) |
97 | @@ -1101,11 +1105,15 @@ | |||
98 | 1101 | { | 1105 | { |
99 | 1102 | lastPos = to_xs_unsignedLong(lColl->size()) - 1; | 1106 | lastPos = to_xs_unsignedLong(lColl->size()) - 1; |
100 | 1103 | } | 1107 | } |
102 | 1104 | catch (std::range_error& e) | 1108 | catch (std::range_error const&) |
103 | 1105 | { | 1109 | { |
104 | 1106 | RAISE_ERROR(zerr::ZSTR0060_RANGE_EXCEPTION, theLoc, | 1110 | RAISE_ERROR(zerr::ZSTR0060_RANGE_EXCEPTION, theLoc, |
107 | 1107 | ERROR_PARAMS(BUILD_STRING("collection too big (" | 1111 | ERROR_PARAMS( |
108 | 1108 | << e.what() << "; " << theName << ")"))); | 1112 | lColl->size(), |
109 | 1113 | ZED( ZSTR0060_ForCollection_3 ), | ||
110 | 1114 | theName | ||
111 | 1115 | ) | ||
112 | 1116 | ); | ||
113 | 1109 | } | 1117 | } |
114 | 1110 | 1118 | ||
115 | 1111 | for (long i = theNumApplied-1; i >= 0; --i) | 1119 | for (long i = theNumApplied-1; i >= 0; --i) |
116 | @@ -1192,11 +1200,15 @@ | |||
117 | 1192 | { | 1200 | { |
118 | 1193 | lastPos = to_xs_unsignedLong(lColl->size()) - 1; | 1201 | lastPos = to_xs_unsignedLong(lColl->size()) - 1; |
119 | 1194 | } | 1202 | } |
121 | 1195 | catch (std::range_error& e) | 1203 | catch (std::range_error const&) |
122 | 1196 | { | 1204 | { |
123 | 1197 | RAISE_ERROR(zerr::ZSTR0060_RANGE_EXCEPTION, theLoc, | 1205 | RAISE_ERROR(zerr::ZSTR0060_RANGE_EXCEPTION, theLoc, |
126 | 1198 | ERROR_PARAMS(BUILD_STRING("collection too big (" | 1206 | ERROR_PARAMS( |
127 | 1199 | << e.what() << "; " << theName << ")"))); | 1207 | lColl->size(), |
128 | 1208 | ZED( ZSTR0060_ForCollection_3 ), | ||
129 | 1209 | theName | ||
130 | 1210 | ) | ||
131 | 1211 | ); | ||
132 | 1200 | } | 1212 | } |
133 | 1201 | 1213 | ||
134 | 1202 | xs_integer const xs_lastPos( lastPos ); | 1214 | xs_integer const xs_lastPos( lastPos ); |
135 | @@ -1291,11 +1303,15 @@ | |||
136 | 1291 | { | 1303 | { |
137 | 1292 | size = to_xs_unsignedLong(coll->size()); | 1304 | size = to_xs_unsignedLong(coll->size()); |
138 | 1293 | } | 1305 | } |
140 | 1294 | catch (std::range_error& e) | 1306 | catch (std::range_error const&) |
141 | 1295 | { | 1307 | { |
142 | 1296 | RAISE_ERROR(zerr::ZSTR0060_RANGE_EXCEPTION, theLoc, | 1308 | RAISE_ERROR(zerr::ZSTR0060_RANGE_EXCEPTION, theLoc, |
145 | 1297 | ERROR_PARAMS(BUILD_STRING("collection too big (" | 1309 | ERROR_PARAMS( |
146 | 1298 | << e.what() << "; " << theName << ")"))); | 1310 | coll->size(), |
147 | 1311 | ZED( ZSTR0060_ForCollection_3 ), | ||
148 | 1312 | theName | ||
149 | 1313 | ) | ||
150 | 1314 | ); | ||
151 | 1299 | } | 1315 | } |
152 | 1300 | 1316 | ||
153 | 1301 | csize numNodes = theNodes.size(); | 1317 | csize numNodes = theNodes.size(); |
154 | 1302 | 1318 | ||
155 | === modified file 'src/store/naive/simple_lazy_temp_seq.cpp' | |||
156 | --- src/store/naive/simple_lazy_temp_seq.cpp 2012-09-19 21:16:15 +0000 | |||
157 | +++ src/store/naive/simple_lazy_temp_seq.cpp 2013-02-04 00:33:24 +0000 | |||
158 | @@ -16,9 +16,11 @@ | |||
159 | 16 | #include "stdafx.h" | 16 | #include "stdafx.h" |
160 | 17 | #include <limits> | 17 | #include <limits> |
161 | 18 | 18 | ||
163 | 19 | #include "diagnostics/xquery_exception.h" | 19 | #include <zorba/diagnostic_list.h> |
164 | 20 | #include "diagnostics/assert.h" | 20 | #include "diagnostics/assert.h" |
165 | 21 | #include "diagnostics/dict.h" | ||
166 | 21 | #include "diagnostics/util_macros.h" | 22 | #include "diagnostics/util_macros.h" |
167 | 23 | #include "diagnostics/xquery_exception.h" | ||
168 | 22 | 24 | ||
169 | 23 | #include "store/api/item.h" | 25 | #include "store/api/item.h" |
170 | 24 | #include "simple_lazy_temp_seq.h" | 26 | #include "simple_lazy_temp_seq.h" |
171 | @@ -170,10 +172,10 @@ | |||
172 | 170 | { | 172 | { |
173 | 171 | pos = to_xs_long(position); | 173 | pos = to_xs_long(position); |
174 | 172 | } | 174 | } |
176 | 173 | catch (std::range_error& e) | 175 | catch (std::range_error const&) |
177 | 174 | { | 176 | { |
178 | 175 | throw ZORBA_EXCEPTION(zerr::ZSTR0060_RANGE_EXCEPTION, | 177 | throw ZORBA_EXCEPTION(zerr::ZSTR0060_RANGE_EXCEPTION, |
180 | 176 | ERROR_PARAMS(BUILD_STRING("sequence too big (" << e.what() << ")"))); | 178 | ERROR_PARAMS(position,ZED(ZSTR0060_ForSequence))); |
181 | 177 | } | 179 | } |
182 | 178 | 180 | ||
183 | 179 | ZORBA_ASSERT(pos >= thePurgedUpTo); | 181 | ZORBA_ASSERT(pos >= thePurgedUpTo); |
184 | @@ -202,10 +204,10 @@ | |||
185 | 202 | { | 204 | { |
186 | 203 | pos = to_xs_long(position); | 205 | pos = to_xs_long(position); |
187 | 204 | } | 206 | } |
189 | 205 | catch (std::range_error& e) | 207 | catch (std::range_error const&) |
190 | 206 | { | 208 | { |
191 | 207 | RAISE_ERROR_NO_LOC(zerr::ZSTR0060_RANGE_EXCEPTION, | 209 | RAISE_ERROR_NO_LOC(zerr::ZSTR0060_RANGE_EXCEPTION, |
193 | 208 | ERROR_PARAMS(BUILD_STRING("access out of bounds " << e.what() << ")"))); | 210 | ERROR_PARAMS(position,ZED(ZSTR0060_ForSequence))); |
194 | 209 | } | 211 | } |
195 | 210 | 212 | ||
196 | 211 | ZORBA_ASSERT(pos > thePurgedUpTo); | 213 | ZORBA_ASSERT(pos > thePurgedUpTo); |
197 | @@ -255,10 +257,10 @@ | |||
198 | 255 | { | 257 | { |
199 | 256 | pos = to_xs_long(position); | 258 | pos = to_xs_long(position); |
200 | 257 | } | 259 | } |
202 | 258 | catch (std::range_error& e) | 260 | catch (std::range_error const&) |
203 | 259 | { | 261 | { |
204 | 260 | RAISE_ERROR_NO_LOC(zerr::ZSTR0060_RANGE_EXCEPTION, | 262 | RAISE_ERROR_NO_LOC(zerr::ZSTR0060_RANGE_EXCEPTION, |
206 | 261 | ERROR_PARAMS(BUILD_STRING("access out of bounds " << e.what() << ")"))); | 263 | ERROR_PARAMS(position,ZED(ZSTR0060_ForSequence))); |
207 | 262 | } | 264 | } |
208 | 263 | 265 | ||
209 | 264 | ZORBA_ASSERT(pos > thePurgedUpTo); | 266 | ZORBA_ASSERT(pos > thePurgedUpTo); |
210 | @@ -317,17 +319,30 @@ | |||
211 | 317 | : | 319 | : |
212 | 318 | theTempSeq(const_cast<SimpleLazyTempSeq*>(tempSeq)) | 320 | theTempSeq(const_cast<SimpleLazyTempSeq*>(tempSeq)) |
213 | 319 | { | 321 | { |
215 | 320 | try | 322 | try |
216 | 321 | { | 323 | { |
217 | 322 | theStartPos = to_xs_long(startPos); | 324 | theStartPos = to_xs_long(startPos); |
218 | 325 | } | ||
219 | 326 | catch ( std::range_error const& ) | ||
220 | 327 | { | ||
221 | 328 | throw ZORBA_EXCEPTION( | ||
222 | 329 | zerr::ZSTR0060_RANGE_EXCEPTION, | ||
223 | 330 | ERROR_PARAMS( startPos, ZED( ZSTR0060_ForSequence ) ) | ||
224 | 331 | ); | ||
225 | 332 | } | ||
226 | 333 | try | ||
227 | 334 | { | ||
228 | 323 | theEndPos = to_xs_long(endPos); | 335 | theEndPos = to_xs_long(endPos); |
229 | 324 | theCurPos = theStartPos - 1; | ||
230 | 325 | } | 336 | } |
232 | 326 | catch (std::range_error& e) | 337 | catch ( std::range_error const& ) |
233 | 327 | { | 338 | { |
236 | 328 | RAISE_ERROR_NO_LOC(zerr::ZSTR0060_RANGE_EXCEPTION, | 339 | throw ZORBA_EXCEPTION( |
237 | 329 | ERROR_PARAMS(BUILD_STRING("sequence too big (" << e.what() << ")"))); | 340 | zerr::ZSTR0060_RANGE_EXCEPTION, |
238 | 341 | ERROR_PARAMS( endPos, ZED( ZSTR0060_ForSequence ) ) | ||
239 | 342 | ); | ||
240 | 330 | } | 343 | } |
241 | 344 | |||
242 | 345 | theCurPos = theStartPos - 1; | ||
243 | 331 | } | 346 | } |
244 | 332 | 347 | ||
245 | 333 | 348 | ||
246 | @@ -360,17 +375,30 @@ | |||
247 | 360 | 375 | ||
248 | 361 | theTempSeq = static_cast<SimpleLazyTempSeq*>(seq.getp()); | 376 | theTempSeq = static_cast<SimpleLazyTempSeq*>(seq.getp()); |
249 | 362 | 377 | ||
251 | 363 | try | 378 | try |
252 | 364 | { | 379 | { |
253 | 365 | theStartPos = to_xs_long(startPos); | 380 | theStartPos = to_xs_long(startPos); |
254 | 381 | } | ||
255 | 382 | catch ( std::range_error const& ) | ||
256 | 383 | { | ||
257 | 384 | throw ZORBA_EXCEPTION( | ||
258 | 385 | zerr::ZSTR0060_RANGE_EXCEPTION, | ||
259 | 386 | ERROR_PARAMS( startPos, ZED( ZSTR0060_ForSequence ) ) | ||
260 | 387 | ); | ||
261 | 388 | } | ||
262 | 389 | try | ||
263 | 390 | { | ||
264 | 366 | theEndPos = to_xs_long(endPos); | 391 | theEndPos = to_xs_long(endPos); |
265 | 367 | theCurPos = theStartPos - 1; | ||
266 | 368 | } | 392 | } |
268 | 369 | catch (std::range_error& e) | 393 | catch ( std::range_error const& ) |
269 | 370 | { | 394 | { |
272 | 371 | RAISE_ERROR_NO_LOC(zerr::ZSTR0060_RANGE_EXCEPTION, | 395 | throw ZORBA_EXCEPTION( |
273 | 372 | ERROR_PARAMS(BUILD_STRING("sequence too big (" << e.what() << ")"))); | 396 | zerr::ZSTR0060_RANGE_EXCEPTION, |
274 | 397 | ERROR_PARAMS( endPos, ZED( ZSTR0060_ForSequence ) ) | ||
275 | 398 | ); | ||
276 | 373 | } | 399 | } |
277 | 400 | |||
278 | 401 | theCurPos = theStartPos - 1; | ||
279 | 374 | } | 402 | } |
280 | 375 | 403 | ||
281 | 376 | 404 | ||
282 | 377 | 405 | ||
283 | === modified file 'src/store/naive/simple_temp_seq.cpp' | |||
284 | --- src/store/naive/simple_temp_seq.cpp 2012-09-19 21:16:15 +0000 | |||
285 | +++ src/store/naive/simple_temp_seq.cpp 2013-02-04 00:33:24 +0000 | |||
286 | @@ -15,10 +15,11 @@ | |||
287 | 15 | */ | 15 | */ |
288 | 16 | #include "stdafx.h" | 16 | #include "stdafx.h" |
289 | 17 | 17 | ||
292 | 18 | #include "diagnostics/xquery_exception.h" | 18 | #include <zorba/diagnostic_list.h> |
291 | 19 | #include "zorba/diagnostic_list.h" | ||
293 | 20 | #include "diagnostics/diagnostic.h" | 19 | #include "diagnostics/diagnostic.h" |
294 | 20 | #include "diagnostics/dict.h" | ||
295 | 21 | #include "diagnostics/util_macros.h" | 21 | #include "diagnostics/util_macros.h" |
296 | 22 | #include "diagnostics/zorba_exception.h" | ||
297 | 22 | 23 | ||
298 | 23 | #include "store/api/item.h" | 24 | #include "store/api/item.h" |
299 | 24 | #include "simple_temp_seq.h" | 25 | #include "simple_temp_seq.h" |
300 | @@ -167,10 +168,12 @@ | |||
301 | 167 | { | 168 | { |
302 | 168 | pos = to_xs_long(position); | 169 | pos = to_xs_long(position); |
303 | 169 | } | 170 | } |
305 | 170 | catch (std::range_error& e) | 171 | catch (std::range_error const&) |
306 | 171 | { | 172 | { |
309 | 172 | RAISE_ERROR_NO_LOC(zerr::ZSTR0060_RANGE_EXCEPTION, | 173 | throw ZORBA_EXCEPTION( |
310 | 173 | ERROR_PARAMS(BUILD_STRING("access out of bounds " << e.what() << ")"))); | 174 | zerr::ZSTR0060_RANGE_EXCEPTION, |
311 | 175 | ERROR_PARAMS( position, ZED(ZSTR0060_ForSequence) ) | ||
312 | 176 | ); | ||
313 | 174 | } | 177 | } |
314 | 175 | 178 | ||
315 | 176 | if (0 < pos && pos <= theItems.size()) | 179 | if (0 < pos && pos <= theItems.size()) |
316 | @@ -194,10 +197,12 @@ | |||
317 | 194 | { | 197 | { |
318 | 195 | pos = to_xs_long(position); | 198 | pos = to_xs_long(position); |
319 | 196 | } | 199 | } |
321 | 197 | catch (std::range_error& e) | 200 | catch (std::range_error const&) |
322 | 198 | { | 201 | { |
325 | 199 | RAISE_ERROR_NO_LOC(zerr::ZSTR0060_RANGE_EXCEPTION, | 202 | throw ZORBA_EXCEPTION( |
326 | 200 | ERROR_PARAMS(BUILD_STRING("access out of bounds " << e.what() << ")"))); | 203 | zerr::ZSTR0060_RANGE_EXCEPTION, |
327 | 204 | ERROR_PARAMS( position, ZED(ZSTR0060_ForSequence) ) | ||
328 | 205 | ); | ||
329 | 201 | } | 206 | } |
330 | 202 | 207 | ||
331 | 203 | return 0 < pos && pos <= theItems.size(); | 208 | return 0 < pos && pos <= theItems.size(); |
332 | @@ -260,15 +265,27 @@ | |||
333 | 260 | xs_long start; | 265 | xs_long start; |
334 | 261 | xs_long end; | 266 | xs_long end; |
335 | 262 | 267 | ||
337 | 263 | try | 268 | try |
338 | 264 | { | 269 | { |
339 | 265 | start = to_xs_long(startPos); | 270 | start = to_xs_long(startPos); |
340 | 271 | } | ||
341 | 272 | catch ( std::range_error const& ) | ||
342 | 273 | { | ||
343 | 274 | throw ZORBA_EXCEPTION( | ||
344 | 275 | zerr::ZSTR0060_RANGE_EXCEPTION, | ||
345 | 276 | ERROR_PARAMS( start, ZED(ZSTR0060_ForSequence) ) | ||
346 | 277 | ); | ||
347 | 278 | } | ||
348 | 279 | try | ||
349 | 280 | { | ||
350 | 266 | end = to_xs_long(endPos); | 281 | end = to_xs_long(endPos); |
351 | 267 | } | 282 | } |
353 | 268 | catch (std::range_error& e) | 283 | catch ( std::range_error const& ) |
354 | 269 | { | 284 | { |
357 | 270 | RAISE_ERROR_NO_LOC(zerr::ZSTR0060_RANGE_EXCEPTION, | 285 | throw ZORBA_EXCEPTION( |
358 | 271 | ERROR_PARAMS(BUILD_STRING("access out of bounds " << e.what() << ")"))); | 286 | zerr::ZSTR0060_RANGE_EXCEPTION, |
359 | 287 | ERROR_PARAMS( end, ZED(ZSTR0060_ForSequence) ) | ||
360 | 288 | ); | ||
361 | 272 | } | 289 | } |
362 | 273 | 290 | ||
363 | 274 | if (start > 0 && end > 0) | 291 | if (start > 0 && end > 0) |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ bug-1108515- 2013-02- 03T19-06- 33.908Z/ log.html
Log at: http://