Merge lp:~paul-lucas/zorba/bug-1180224 into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Chris Hillery
Approved revision: 11490
Merged at revision: 11490
Proposed branch: lp:~paul-lucas/zorba/bug-1180224
Merge into: lp:zorba
Diff against target: 654 lines (+0/-441)
11 files modified
include/zorba/diagnostic.h (+0/-49)
include/zorba/error.h (+0/-1)
include/zorba/internal/qname.h (+0/-29)
include/zorba/internal/system_diagnostic.h (+0/-1)
src/capi/error.cpp (+0/-24)
src/diagnostics/diagnostic.cpp (+0/-41)
src/diagnostics/diagnostic_en.xml (+0/-180)
src/diagnostics/pregenerated/dict_en.cpp (+0/-45)
src/diagnostics/qname.cpp (+0/-60)
src/diagnostics/user_error.cpp (+0/-4)
src/diagnostics/zorba_exception.cpp (+0/-7)
To merge this branch: bzr merge lp:~paul-lucas/zorba/bug-1180224
Reviewer Review Type Date Requested Status
Chris Hillery Approve
Paul J. Lucas Approve
Review via email: mp+167184@code.launchpad.net

Commit message

Removed category enum and everything that goes along with it.

Description of the change

Removed category enum and everything that goes along with it.

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 :

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

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:281 (message):
  Validation queue job bug-1180224-2013-06-04T00-44-49.419Z 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
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-1180224-2013-06-04T04-39-59.57Z 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, Needs Information < 1, Resubmit < 1. Got: 1 Approve.

Revision history for this message
Chris Hillery (ceejatec) :
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-1180224-2013-06-04T07-55-57.525Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'include/zorba/diagnostic.h'
--- include/zorba/diagnostic.h 2013-02-07 17:24:36 +0000
+++ include/zorba/diagnostic.h 2013-06-04 01:34:26 +0000
@@ -221,48 +221,6 @@
221///////////////////////////////////////////////////////////////////////////////221///////////////////////////////////////////////////////////////////////////////
222222
223/**223/**
224 * An diagnostic::category is the category of error.
225 */
226enum category {
227 UNKNOWN_CATEGORY, // must have integer value of 0
228
229 XQUERY_CORE,
230 XQUERY_FULL_TEXT,
231 XQUERY_SCRIPTING,
232 XQUERY_SERIALIZATION,
233 XQUERY_UPDATE,
234 XQUERY_USER_DEFINED, // for fn:error()
235
236 ZORBA_XQP, // Zorba XQuery Processor
237 ZORBA_API, // Zorba API
238 ZORBA_DDF, // Data Definition Facility
239 ZORBA_DEBUGGER, // Zorba Debugger
240 ZORBA_OS, // Operating System
241 ZORBA_SERIALIZATION,
242 ZORBA_STORE,
243
244 JSON_PARSER,
245 JSON_SERIALIZATION,
246
247# ifdef ZORBA_WITH_JSON
248 JSONIQ_CORE,
249 JSONIQ_UPDATE,
250# endif /* ZORBA_WITH_JSON */
251
252 ZORBA_CORE_MODULE // Zorba Core Module
253};
254
255/**
256 * Emits the given diagnostic::category to the given ostream.
257 *
258 * @param o The ostream to emit to.
259 * @param c The category to emit.
260 * @return Returns \a o.
261 */
262ZORBA_DLL_PUBLIC
263std::ostream& operator<<( std::ostream &o, category c );
264
265/**
266 * An diagnostic::kind is the kind of error.224 * An diagnostic::kind is the kind of error.
267 * See: http://www.w3.org/TR/xquery-30/#id-kinds-of-errors225 * See: http://www.w3.org/TR/xquery-30/#id-kinds-of-errors
268 */226 */
@@ -332,13 +290,6 @@
332 virtual diagnostic::QName const& qname() const = 0;290 virtual diagnostic::QName const& qname() const = 0;
333291
334 /**292 /**
335 * Gets the category of this diagnostic.
336 *
337 * @return Returns said category.
338 */
339 virtual diagnostic::category category() const;
340
341 /**
342 * Gets the kind of this diagnostic.293 * Gets the kind of this diagnostic.
343 *294 *
344 * @return Returns said kind.295 * @return Returns said kind.
345296
=== modified file 'include/zorba/error.h'
--- include/zorba/error.h 2013-02-07 17:24:36 +0000
+++ include/zorba/error.h 2013-06-04 01:34:26 +0000
@@ -78,7 +78,6 @@
7878
79 // inherited79 // inherited
80 diagnostic::QName const& qname() const;80 diagnostic::QName const& qname() const;
81 diagnostic::category category() const;
8281
83protected:82protected:
84 // inherited83 // inherited
8584
=== modified file 'include/zorba/internal/qname.h'
--- include/zorba/internal/qname.h 2013-02-07 17:24:36 +0000
+++ include/zorba/internal/qname.h 2013-06-04 01:34:26 +0000
@@ -131,13 +131,6 @@
131 ZorbaErrQName( char const *localname ) : base_type( localname ) { }131 ZorbaErrQName( char const *localname ) : base_type( localname ) { }
132132
133 /**133 /**
134 * Gets the category of error this QName represents.
135 *
136 * @return Returns said kind.
137 */
138 zorba::diagnostic::category category() const;
139
140 /**
141 * Gets the kind of error this QName represents.134 * Gets the kind of error this QName represents.
142 *135 *
143 * @return Returns said kind.136 * @return Returns said kind.
@@ -166,13 +159,6 @@
166 XQueryErrQName( char const *localname ) : base_type( localname ) { }159 XQueryErrQName( char const *localname ) : base_type( localname ) { }
167160
168 /**161 /**
169 * Gets the category of error this QName represents.
170 *
171 * @return Returns said kind.
172 */
173 zorba::diagnostic::category category() const;
174
175 /**
176 * Gets the kind of error this QName represents.162 * Gets the kind of error this QName represents.
177 *163 *
178 * @return Returns said kind.164 * @return Returns said kind.
@@ -203,14 +189,6 @@
203 JSONiqErrQName( char const *localname ) : base_type( localname ) { }189 JSONiqErrQName( char const *localname ) : base_type( localname ) { }
204190
205 /**191 /**
206 * Gets the category of error this QName represents.
207 *
208 * @return Returns UNKNOWN_CATEGORY as there currently
209 * are no categories for JSONiq errors
210 */
211 zorba::diagnostic::category category() const;
212
213 /**
214 * Gets the kind of error this QName represents.192 * Gets the kind of error this QName represents.
215 *193 *
216 * @return Returns said kind.194 * @return Returns said kind.
@@ -241,13 +219,6 @@
241 ZorbaWarningQName( char const *localname ) : base_type( localname ) { }219 ZorbaWarningQName( char const *localname ) : base_type( localname ) { }
242220
243 /**221 /**
244 * Gets the category of warning this QName represents.
245 *
246 * @return Returns said kind.
247 */
248 zorba::diagnostic::category category() const;
249
250 /**
251 * Gets the kind of warning this QName represents.222 * Gets the kind of warning this QName represents.
252 *223 *
253 * @return Returns said kind.224 * @return Returns said kind.
254225
=== modified file 'include/zorba/internal/system_diagnostic.h'
--- include/zorba/internal/system_diagnostic.h 2013-02-07 17:24:36 +0000
+++ include/zorba/internal/system_diagnostic.h 2013-06-04 01:34:26 +0000
@@ -79,7 +79,6 @@
79 }79 }
8080
81 // inherited81 // inherited
82 zorba::diagnostic::category category() const { return qname_.category(); }
83 zorba::diagnostic::kind kind() const { return qname_.kind(); }82 zorba::diagnostic::kind kind() const { return qname_.kind(); }
84 zorba::diagnostic::QName const& qname() const { return qname_; }83 zorba::diagnostic::QName const& qname() const { return qname_; }
8584
8685
=== modified file 'src/capi/error.cpp'
--- src/capi/error.cpp 2013-02-07 17:24:36 +0000
+++ src/capi/error.cpp 2013-06-04 01:34:26 +0000
@@ -71,30 +71,6 @@
7171
72 /////////////////////////////////////////////////////////////////////////////72 /////////////////////////////////////////////////////////////////////////////
7373
74 switch ( error.category() ) {
75
76 case XQUERY_SERIALIZATION:
77 return XQC_SERIALIZATION_ERROR;
78
79 case ZORBA_API:
80 if ( error == ZAPI0002_XQUERY_COMPILATION_FAILED )
81 return XQC_STATIC_ERROR;
82 return XQC_INVALID_ARGUMENT;
83
84 case ZORBA_SERIALIZATION:
85 return XQC_INTERNAL_ERROR;
86
87 case ZORBA_DDF:
88 case ZORBA_STORE:
89 return XQC_INVALID_ARGUMENT;
90
91 case ZORBA_OS:
92 return XQC_DYNAMIC_ERROR;
93
94 default: // suppresses warning
95 break;
96 }
97
98 switch ( error.kind() ) {74 switch ( error.kind() ) {
99 case XQUERY_DYNAMIC: return XQC_DYNAMIC_ERROR;75 case XQUERY_DYNAMIC: return XQC_DYNAMIC_ERROR;
100 case XQUERY_STATIC : return XQC_STATIC_ERROR;76 case XQUERY_STATIC : return XQC_STATIC_ERROR;
10177
=== modified file 'src/diagnostics/diagnostic.cpp'
--- src/diagnostics/diagnostic.cpp 2013-03-26 01:56:30 +0000
+++ src/diagnostics/diagnostic.cpp 2013-06-04 01:34:26 +0000
@@ -111,43 +111,6 @@
111 return false;111 return false;
112}112}
113113
114ostream& operator<<( ostream &o, category c ) {
115 //
116 // It's OK for these to be only in English: they're looked-up in the
117 // diagnostic dictionary later.
118 //
119 switch ( c ) {
120 case UNKNOWN_CATEGORY : o << "unknown" ; break;
121
122 // XQUERY_CORE : /* nothing */
123 case XQUERY_FULL_TEXT : o << "full-text" ; break;
124 case XQUERY_SCRIPTING : o << "scripting" ; break;
125 case XQUERY_SERIALIZATION: o << "serialization" ; break;
126 case XQUERY_UPDATE : o << "update" ; break;
127 case XQUERY_USER_DEFINED : o << "user-defined" ; break;
128
129 case ZORBA_API : o << "Zorba API" ; break;
130 case ZORBA_CORE_MODULE : o << "Zorba core module" ; break;
131 case ZORBA_DDF : o << "Zorba data-definition" ; break;
132 case ZORBA_DEBUGGER : o << "Zorba debugger" ; break;
133 case ZORBA_OS : o << "operating system" ; break;
134 case ZORBA_SERIALIZATION : o << "Zorba serialization" ; break;
135 case ZORBA_STORE : o << "Zorba store" ; break;
136 case ZORBA_XQP : o << "Zorba" ; break;
137
138 case JSON_PARSER : o << "JSON parser" ; break;
139 case JSON_SERIALIZATION : o << "JSON serialization" ; break;
140
141# ifdef ZORBA_WITH_JSON
142 case JSONIQ_CORE : o << "JSONiq" ; break;
143 case JSONIQ_UPDATE : o << "JSONiq update" ; break;
144# endif
145
146 default : /* suppresses warning */ break;
147 }
148 return o;
149}
150
151ostream& operator<<( ostream &o, kind k ) {114ostream& operator<<( ostream &o, kind k ) {
152 //115 //
153 // It's OK for these to be only in English: they're looked-up in the116 // It's OK for these to be only in English: they're looked-up in the
@@ -424,10 +387,6 @@
424 delete this;387 delete this;
425}388}
426389
427diagnostic::category Diagnostic::category() const {
428 return diagnostic::UNKNOWN_CATEGORY;
429}
430
431diagnostic::kind Diagnostic::kind() const {390diagnostic::kind Diagnostic::kind() const {
432 return diagnostic::UNKNOWN_KIND;391 return diagnostic::UNKNOWN_KIND;
433}392}
434393
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2013-05-24 22:52:47 +0000
+++ src/diagnostics/diagnostic_en.xml 2013-06-04 01:34:26 +0000
@@ -4330,110 +4330,6 @@
4330 <value>zero-length URI (and no base URI given)</value>4330 <value>zero-length URI (and no base URI given)</value>
4331 </entry>4331 </entry>
43324332
4333 <entry key="Zorba API error">
4334 <value>Zorba API error</value>
4335 </entry>
4336
4337 <entry key="Zorba core module error">
4338 <value>Zorba core module error</value>
4339 </entry>
4340
4341 <entry key="Zorba data-definition error">
4342 <value>Zorba data-definition error</value>
4343 </entry>
4344
4345 <entry key="Zorba dynamic error">
4346 <value>Zorba dynamic error</value>
4347 </entry>
4348
4349 <entry key="Zorba dynamic warning">
4350 <value>Zorba dynamic warning</value>
4351 </entry>
4352
4353 <entry key="Zorba error">
4354 <value>Zorba error</value>
4355 </entry>
4356
4357 <entry key="Zorba serialization error">
4358 <value>Zorba serialization error</value>
4359 </entry>
4360
4361 <entry key="Zorba serialization warning">
4362 <value>Zorba serialization warning</value>
4363 </entry>
4364
4365 <entry key="Zorba static error">
4366 <value>Zorba static error</value>
4367 </entry>
4368
4369 <entry key="Zorba static warning">
4370 <value>Zorba static warning</value>
4371 </entry>
4372
4373 <entry key="Zorba store error">
4374 <value>Zorba store error</value>
4375 </entry>
4376
4377 <entry key="Zorba type error">
4378 <value>Zorba type error</value>
4379 </entry>
4380
4381 <entry key="Zorba type warning">
4382 <value>Zorba type warning</value>
4383 </entry>
4384
4385 <entry key="Zorba warning">
4386 <value>Zorba warning</value>
4387 </entry>
4388
4389 <entry key="JSON parser error">
4390 <value>JSON parser error</value>
4391 </entry>
4392
4393 <entry key="JSON serialization error">
4394 <value>JSON serialization error</value>
4395 </entry>
4396
4397 <entry key="JSONiq error">
4398 <value>JSONIQ error</value>
4399 </entry>
4400
4401 <entry key="JSONiq type error">
4402 <value>JSONIQ type error</value>
4403 </entry>
4404
4405 <entry key="JSONiq static error">
4406 <value>JSONIQ static error</value>
4407 </entry>
4408
4409 <entry key="JSONiq dynamic error">
4410 <value>JSONIQ dynamic error</value>
4411 </entry>
4412
4413 <entry key="JSONiq serialization error">
4414 <value>JSONIQ serialization error</value>
4415 </entry>
4416
4417 <entry key="JSONiq warning">
4418 <value>JSONIQ warning</value>
4419 </entry>
4420
4421 <entry key="JSONiq type warning">
4422 <value>JSONIQ type warning</value>
4423 </entry>
4424
4425 <entry key="JSONiq static warning">
4426 <value>JSONIQ static warning</value>
4427 </entry>
4428
4429 <entry key="JSONiq dynamic warning">
4430 <value>JSONIQ dynamic warning</value>
4431 </entry>
4432
4433 <entry key="JSONiq serialization warning">
4434 <value>JSONIQ serialization warning</value>
4435 </entry>
4436
4437 <entry key="dynamic error">4333 <entry key="dynamic error">
4438 <value>dynamic error</value>4334 <value>dynamic error</value>
4439 </entry>4335 </entry>
@@ -4446,50 +4342,6 @@
4446 <value>error</value>4342 <value>error</value>
4447 </entry>4343 </entry>
44484344
4449 <entry key="full-text dynamic error">
4450 <value>full-text dynamic error</value>
4451 </entry>
4452
4453 <entry key="full-text dynamic warning">
4454 <value>full-text dynamic warning</value>
4455 </entry>
4456
4457 <entry key="full-text static error">
4458 <value>full-text static error</value>
4459 </entry>
4460
4461 <entry key="full-text static warning">
4462 <value>full-text static warning</value>
4463 </entry>
4464
4465 <entry key="full-text type error">
4466 <value>full-text type error</value>
4467 </entry>
4468
4469 <entry key="full-text type warning">
4470 <value>full-text type warning</value>
4471 </entry>
4472
4473 <entry key="operating system error">
4474 <value>operating system error</value>
4475 </entry>
4476
4477 <entry key="scripting static error">
4478 <value>scripting static error</value>
4479 </entry>
4480
4481 <entry key="scripting static warning">
4482 <value>scripting static warning</value>
4483 </entry>
4484
4485 <entry key="serialization error">
4486 <value>serialization error</value>
4487 </entry>
4488
4489 <entry key="serialization warning">
4490 <value>serialization warning</value>
4491 </entry>
4492
4493 <entry key="static error">4345 <entry key="static error">
4494 <value>static error</value>4346 <value>static error</value>
4495 </entry>4347 </entry>
@@ -4506,38 +4358,6 @@
4506 <value>type warning</value>4358 <value>type warning</value>
4507 </entry>4359 </entry>
45084360
4509 <entry key="update dynamic error">
4510 <value>update dynamic error</value>
4511 </entry>
4512
4513 <entry key="update dynamic warning">
4514 <value>update dynamic warning</value>
4515 </entry>
4516
4517 <entry key="update static error">
4518 <value>update static error</value>
4519 </entry>
4520
4521 <entry key="update static warning">
4522 <value>update static warning</value>
4523 </entry>
4524
4525 <entry key="update type error">
4526 <value>update type error</value>
4527 </entry>
4528
4529 <entry key="update type warning">
4530 <value>update type warning</value>
4531 </entry>
4532
4533 <entry key="user-defined error">
4534 <value>user-defined error</value>
4535 </entry>
4536
4537 <entry key="user-defined warning">
4538 <value>user-defined warning</value>
4539 </entry>
4540
4541 <entry key="warning">4361 <entry key="warning">
4542 <value>warning</value>4362 <value>warning</value>
4543 </entry>4363 </entry>
45444364
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2013-05-24 22:52:47 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2013-06-04 01:34:26 +0000
@@ -707,18 +707,6 @@
707 { "~JNUP0008_ObjectArray", "\"$2\": target of a deleting or replacing expression is not a JSON item" },707 { "~JNUP0008_ObjectArray", "\"$2\": target of a deleting or replacing expression is not a JSON item" },
708 { "~JNUP0016_Array", "\"$2\": selector cannot be resolved against supplied array" },708 { "~JNUP0016_Array", "\"$2\": selector cannot be resolved against supplied array" },
709 { "~JNUP0016_Object", "\"$2\": selector cannot be resolved against supplied object" },709 { "~JNUP0016_Object", "\"$2\": selector cannot be resolved against supplied object" },
710 { "~JSON parser error", "JSON parser error" },
711 { "~JSON serialization error", "JSON serialization error" },
712 { "~JSONiq dynamic error", "JSONIQ dynamic error" },
713 { "~JSONiq dynamic warning", "JSONIQ dynamic warning" },
714 { "~JSONiq error", "JSONIQ error" },
715 { "~JSONiq serialization error", "JSONIQ serialization error" },
716 { "~JSONiq serialization warning", "JSONIQ serialization warning" },
717 { "~JSONiq static error", "JSONIQ static error" },
718 { "~JSONiq static warning", "JSONIQ static warning" },
719 { "~JSONiq type error", "JSONIQ type error" },
720 { "~JSONiq type warning", "JSONIQ type warning" },
721 { "~JSONiq warning", "JSONIQ warning" },
722 { "~LibModVersionMismatch_3", "XQuery library version can not be imported by a $3 version module" },710 { "~LibModVersionMismatch_3", "XQuery library version can not be imported by a $3 version module" },
723 { "~ModuleNotFound", "module not found" },711 { "~ModuleNotFound", "module not found" },
724 { "~MustBeAbsoluteURI", "must be absolute" },712 { "~MustBeAbsoluteURI", "must be absolute" },
@@ -1036,29 +1024,9 @@
1036 { "~ZXQP0004_TypeOps_is_in_scope_ForFunctionItemTypes", "TypeOps::is_in_scope() for function-item types" },1024 { "~ZXQP0004_TypeOps_is_in_scope_ForFunctionItemTypes", "TypeOps::is_in_scope() for function-item types" },
1037 { "~ZXQP0025_RESOURCE_NOT_FOUND", "resource not found" },1025 { "~ZXQP0025_RESOURCE_NOT_FOUND", "resource not found" },
1038 { "~ZeroLenURI", "zero-length URI (and no base URI given)" },1026 { "~ZeroLenURI", "zero-length URI (and no base URI given)" },
1039 { "~Zorba API error", "Zorba API error" },
1040 { "~Zorba core module error", "Zorba core module error" },
1041 { "~Zorba data-definition error", "Zorba data-definition error" },
1042 { "~Zorba dynamic error", "Zorba dynamic error" },
1043 { "~Zorba dynamic warning", "Zorba dynamic warning" },
1044 { "~Zorba error", "Zorba error" },
1045 { "~Zorba serialization error", "Zorba serialization error" },
1046 { "~Zorba serialization warning", "Zorba serialization warning" },
1047 { "~Zorba static error", "Zorba static error" },
1048 { "~Zorba static warning", "Zorba static warning" },
1049 { "~Zorba store error", "Zorba store error" },
1050 { "~Zorba type error", "Zorba type error" },
1051 { "~Zorba type warning", "Zorba type warning" },
1052 { "~Zorba warning", "Zorba warning" },
1053 { "~dynamic error", "dynamic error" },1027 { "~dynamic error", "dynamic error" },
1054 { "~dynamic warning", "dynamic warning" },1028 { "~dynamic warning", "dynamic warning" },
1055 { "~error", "error" },1029 { "~error", "error" },
1056 { "~full-text dynamic error", "full-text dynamic error" },
1057 { "~full-text dynamic warning", "full-text dynamic warning" },
1058 { "~full-text static error", "full-text static error" },
1059 { "~full-text static warning", "full-text static warning" },
1060 { "~full-text type error", "full-text type error" },
1061 { "~full-text type warning", "full-text type warning" },
1062 { "~libxml_ERR_1", "libxml internal error${: 9}" },1030 { "~libxml_ERR_1", "libxml internal error${: 9}" },
1063 { "~libxml_ERR_101", "encoding expected in text declaration" },1031 { "~libxml_ERR_101", "encoding expected in text declaration" },
1064 { "~libxml_ERR_103", "\"$5\": entity marked standalone but requires external subset" },1032 { "~libxml_ERR_103", "\"$5\": entity marked standalone but requires external subset" },
@@ -1204,23 +1172,10 @@
1204 { "~libxml_WAR_97", "\"$5\": unsupported XML version" },1172 { "~libxml_WAR_97", "\"$5\": unsupported XML version" },
1205 { "~libxml_WAR_98", "\"$5\": malformed xml:lang value" },1173 { "~libxml_WAR_98", "\"$5\": malformed xml:lang value" },
1206 { "~libxml_WAR_99", "xmlns$6?{:5}\\: URI \"$6?6:5\": invalid URI" },1174 { "~libxml_WAR_99", "xmlns$6?{:5}\\: URI \"$6?6:5\": invalid URI" },
1207 { "~operating system error", "operating system error" },
1208 { "~scripting static error", "scripting static error" },
1209 { "~scripting static warning", "scripting static warning" },
1210 { "~serialization error", "serialization error" },
1211 { "~serialization warning", "serialization warning" },
1212 { "~static error", "static error" },1175 { "~static error", "static error" },
1213 { "~static warning", "static warning" },1176 { "~static warning", "static warning" },
1214 { "~type error", "type error" },1177 { "~type error", "type error" },
1215 { "~type warning", "type warning" },1178 { "~type warning", "type warning" },
1216 { "~update dynamic error", "update dynamic error" },
1217 { "~update dynamic warning", "update dynamic warning" },
1218 { "~update static error", "update static error" },
1219 { "~update static warning", "update static warning" },
1220 { "~update type error", "update type error" },
1221 { "~update type warning", "update type warning" },
1222 { "~user-defined error", "user-defined error" },
1223 { "~user-defined warning", "user-defined warning" },
1224 { "~warning", "warning" },1179 { "~warning", "warning" },
1225 { "~xqueryx_empty_content", "xqueryx content is empty" },1180 { "~xqueryx_empty_content", "xqueryx content is empty" },
1226};1181};
12271182
=== modified file 'src/diagnostics/qname.cpp'
--- src/diagnostics/qname.cpp 2013-04-24 16:12:40 +0000
+++ src/diagnostics/qname.cpp 2013-06-04 01:34:26 +0000
@@ -29,23 +29,6 @@
29char const XQueryErrQName::NAMESPACE[] = XQUERY_ERR_NS;29char const XQueryErrQName::NAMESPACE[] = XQUERY_ERR_NS;
30char const XQueryErrQName::PREFIX[] = "err";30char const XQueryErrQName::PREFIX[] = "err";
3131
32zorba::diagnostic::category XQueryErrQName::category() const {
33 using namespace zorba::diagnostic;
34
35 char const *const name = localname();
36
37 if ( ascii::begins_with( name, "FT", 2 ) )
38 return XQUERY_FULL_TEXT;
39 if ( ascii::begins_with( name, "SE", 2 ) )
40 return XQUERY_SERIALIZATION;
41 if ( ascii::begins_with( name, "XS", 2 ) )
42 return XQUERY_SCRIPTING;
43 if ( ascii::begins_with( name, "XU", 2 ) )
44 return XQUERY_UPDATE;
45
46 return XQUERY_CORE;
47}
48
49zorba::diagnostic::kind XQueryErrQName::kind() const {32zorba::diagnostic::kind XQueryErrQName::kind() const {
50 using namespace zorba::diagnostic;33 using namespace zorba::diagnostic;
5134
@@ -70,17 +53,6 @@
70char const JSONiqErrQName::NAMESPACE[] = JSONIQ_ERR_NS;53char const JSONiqErrQName::NAMESPACE[] = JSONIQ_ERR_NS;
71char const JSONiqErrQName::PREFIX[] = "jerr";54char const JSONiqErrQName::PREFIX[] = "jerr";
7255
73zorba::diagnostic::category JSONiqErrQName::category() const {
74 using namespace zorba::diagnostic;
75
76 char const *const name = localname();
77
78 if ( ascii::begins_with( name, "JU", 2 ) )
79 return JSONIQ_UPDATE;
80
81 return JSONIQ_CORE;
82}
83
84zorba::diagnostic::kind JSONiqErrQName::kind() const {56zorba::diagnostic::kind JSONiqErrQName::kind() const {
85 using namespace zorba::diagnostic;57 using namespace zorba::diagnostic;
8658
@@ -103,34 +75,6 @@
103char const ZorbaErrQName::NAMESPACE[] = ZORBA_ERR_NS;75char const ZorbaErrQName::NAMESPACE[] = ZORBA_ERR_NS;
104char const ZorbaErrQName::PREFIX[] = "zerr";76char const ZorbaErrQName::PREFIX[] = "zerr";
10577
106zorba::diagnostic::category ZorbaErrQName::category() const {
107 using namespace zorba::diagnostic;
108
109 char const *const name = localname();
110 ZORBA_ASSERT( name );
111
112 switch ( name[1] ) {
113 case 'A': return ZORBA_API;
114 case 'C': return ZORBA_SERIALIZATION;
115 case 'D': switch ( name[3] ) {
116 case 'P': return ZORBA_CORE_MODULE;
117 default : return ZORBA_DDF;
118 }
119 case 'G': return ZORBA_DEBUGGER;
120 case 'J': switch ( name[2] ) {
121 case 'P': return JSON_PARSER;
122 case 'S': return JSON_SERIALIZATION;
123 default : ZORBA_ASSERT( false );
124 }
125 case 'O': return ZORBA_OS;
126 case 'S': return ZORBA_STORE;
127 case 'X': return ZORBA_XQP;
128 case 'U': return ZORBA_CORE_MODULE;
129
130 default : ZORBA_ASSERT( false );
131 }
132}
133
134zorba::diagnostic::kind ZorbaErrQName::kind() const {78zorba::diagnostic::kind ZorbaErrQName::kind() const {
135 return zorba::diagnostic::UNKNOWN_KIND;79 return zorba::diagnostic::UNKNOWN_KIND;
136}80}
@@ -140,10 +84,6 @@
140char const ZorbaWarningQName::NAMESPACE[] = ZORBA_WARN_NS;84char const ZorbaWarningQName::NAMESPACE[] = ZORBA_WARN_NS;
141char const ZorbaWarningQName::PREFIX[] = "zwarn";85char const ZorbaWarningQName::PREFIX[] = "zwarn";
14286
143zorba::diagnostic::category ZorbaWarningQName::category() const {
144 return zorba::diagnostic::ZORBA_XQP;
145}
146
147zorba::diagnostic::kind ZorbaWarningQName::kind() const {87zorba::diagnostic::kind ZorbaWarningQName::kind() const {
148 using namespace zorba::diagnostic;88 using namespace zorba::diagnostic;
14989
15090
=== modified file 'src/diagnostics/user_error.cpp'
--- src/diagnostics/user_error.cpp 2013-02-07 17:24:36 +0000
+++ src/diagnostics/user_error.cpp 2013-06-04 01:34:26 +0000
@@ -68,10 +68,6 @@
68 return qname_;68 return qname_;
69}69}
7070
71diagnostic::category UserError::category() const {
72 return diagnostic::XQUERY_USER_DEFINED;
73}
74
75///////////////////////////////////////////////////////////////////////////////71///////////////////////////////////////////////////////////////////////////////
7672
77} // namespace zorba73} // namespace zorba
7874
=== modified file 'src/diagnostics/zorba_exception.cpp'
--- src/diagnostics/zorba_exception.cpp 2013-05-23 00:23:33 +0000
+++ src/diagnostics/zorba_exception.cpp 2013-06-04 01:34:26 +0000
@@ -141,15 +141,8 @@
141 //141 //
142 ostringstream oss;142 ostringstream oss;
143 oss << ZED_PREFIX;143 oss << ZED_PREFIX;
144
145 streampos pos = oss.tellp();
146 oss << d.category();
147 if ( oss.tellp() != pos ) // emit ' ' only if non-empty category
148 oss << ' ';
149
150 if ( diagnostic::kind const k = d.kind() )144 if ( diagnostic::kind const k = d.kind() )
151 oss << k << ' ';145 oss << k << ' ';
152
153 oss << (is_warning( d ) ? "warning" : "error");146 oss << (is_warning( d ) ? "warning" : "error");
154 o << diagnostic::dict::lookup( oss.str() ) << " [" << d.qname() << ']';147 o << diagnostic::dict::lookup( oss.str() ) << " [" << d.qname() << ']';
155 }148 }

Subscribers

People subscribed via source and target branches