[Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-13 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba has been 
updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-13 Thread Zorba Build Bot
Validation queue job ordpathmsgs-2012-04-13T08-43-01.773Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-13 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/ordpathmsgs-2012-04-13T08-43-01.773Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-13 Thread David Graf
The proposal to merge lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba has been 
updated.

Commit Message changed to:

Bug #980600.
Introduced ZORBA_ASSERT_WITH_MSG macro to give additional debugging information 
in case an assertion fails. Currently used in Ordpath functions.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-11 Thread Till Westmann
The proposal to merge lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-11 Thread Till Westmann
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-11 Thread Markos Zaharioudakis
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-11 Thread David Graf
David Graf has proposed merging lp:~zorba-coders/zorba/ordpathmsgs into 
lp:zorba.

Requested reviews:
  Till Westmann (tillw)
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520

Introduced ZORBA_ASSERT_WITH_MSG macro to give additional debugging information 
in case an assertion fails. Currently used in Ordpath functions.
-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101520
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/diagnostics/assert.cpp'
--- src/diagnostics/assert.cpp	2012-03-28 05:19:57 +
+++ src/diagnostics/assert.cpp	2012-04-11 09:44:20 +
@@ -59,10 +59,16 @@
 
 ///
 
-void assertion_failed( char const *condition, char const *file, int line ) {
+void assertion_failed( char const *condition, 
+   char const *file, 
+   int line,
+   char const *msg) {
   print_stack_trace( cerr );
   throw make_zorba_exception(
-file, line, zerr::ZXQP0002_ASSERT_FAILED, ERROR_PARAMS( condition )
+file, 
+line, 
+zerr::ZXQP0002_ASSERT_FAILED, 
+( msg ? ERROR_PARAMS( condition, msg ) : ERROR_PARAMS( condition ))
   );
 }
 

=== modified file 'src/diagnostics/assert.h'
--- src/diagnostics/assert.h	2012-03-28 05:19:57 +
+++ src/diagnostics/assert.h	2012-04-11 09:44:20 +
@@ -29,12 +29,18 @@
  * @param condition The string representation of the condition that failed.
  * @param file The C++ source-code file name where the assertion failed.
  * @param line The C++ source-code line number where the assertion failed.
+ * @param msg An optional message that is output if the assertion fails.
  * @throws ZXQP0002_ASSERT_FAILED
  */
-void assertion_failed( char const *condition, char const *file, int line );
+void assertion_failed( char const *condition,
+   char const *file, 
+   int line, 
+   char const *msg = 0);
 
 /**
  * Zorba version of the standard assert(3) macro.
+ * Is checked in RELEASE mode as well. And outputs a special
+ * error code with the failing condition.
  */
 #define ZORBA_ASSERT(COND)  \
   do {  \
@@ -44,6 +50,22 @@
 }   \
   } while (0)
 
+/**
+ * Zorba version of the standard assert(3) macro.
+ * Is checked in RELEASE mode as well. And outputs a special
+ * error code with the failing condition as well as potentially
+ * useful information for further debugging.
+ */
+#define ZORBA_ASSERT_WITH_MSG(COND,MSG)\
+  do { \
+if ( !(COND) ) {   \
+  std::ostringstream oss;  \
+  oss << MSG;  \
+  zorba::assertion_failed( #COND, __FILE__, __LINE__, oss.str().c_str() ); \
+  throw 0; /* never gets here but suppresses warning */\
+}  \
+  } while (0)
+
 } // namespace zorba
 #endif /* ZORBA_ASSERT_H */
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2012-03-28 05:19:57 +
+++ src/diagnostics/diagnostic_en.xml	2012-04-11 09:44:20 +
@@ -1589,7 +1589,7 @@
A Zorba programming assertion failed.  If this error occurs, it is a bug
and should be reported.
   
-  "$1": assertion failed
+  "$1": assertion failed.${ The following information might help: 2}
 
 
 

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2012-03-28 05:19:57 +
+++ src/diagnostics/pregenerated/dict_en.cpp	2012-04-11 09:44:20 +
@@ -392,7 +392,7 @@
   { "ZXQD0006", "\"$1\": invalid UTF-8 byte sequence" },
   { "ZXQP", "no error" },
   { "ZXQP0001", "dynamic runtime error${: 1}" },
-  { "ZXQP0002", "\"$1\": assertion failed" },
+  { "ZXQP0002", "\"$1\": assertion failed.${ The following information might help: 2}" },
   { "ZXQP0003", "internal error${: 1}" },
   { "ZXQP0004", "not yet implemented: $1" },
   { "ZXQP0005", "\"$1\": feature not enabled" },

=== modified file 'src/store/naive/ordpath.cpp'
--- src/store/naive/ordpath.cpp	2012-03-28 23:58:23 +
+++ src/store/naive/ordpath.cpp	2012-04-11 09:44:20 +
@@ -960,7 +960,14 @@
   while (dewey1[compPos] == dewey2[compPos])
   {
 ++compPos;
-ZORBA_ASSERT(compPos < numComps1 && compPos < numComps2);
+ZORBA_ASSERT_WITH_MSG(compPos < numComps1 && compPos < numComps2,  \
+  "Involved Parameter

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-10 Thread Till Westmann
Review: Needs Information

Looks good, but it is not clear how the changes in bin/debugger/command.h and 
src/runtime/collections/collections_impl.cpp are related to the new macro.
-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101373
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/ordpathmsgs into lp:zorba

2012-04-10 Thread David Graf
David Graf has proposed merging lp:~zorba-coders/zorba/ordpathmsgs into 
lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)
  Till Westmann (tillw)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101373

Introduced ZORBA_ASSERT_WITH_MSG macro to give additional debugging information 
in case an assertion fails. Currently used in Ordpath functions.
-- 
https://code.launchpad.net/~zorba-coders/zorba/ordpathmsgs/+merge/101373
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'bin/debugger/command.h'
--- bin/debugger/command.h	2012-03-28 05:19:57 +
+++ bin/debugger/command.h	2012-04-10 13:13:23 +
@@ -57,6 +57,7 @@
   
   class UntypedCommand {
   public:
+virtual ~UntypedCommand() {}
 virtual std::string getName() const = 0;
 virtual std::set getAliases() const = 0;
 virtual std::string getDescription() const = 0;

=== modified file 'src/diagnostics/assert.cpp'
--- src/diagnostics/assert.cpp	2012-03-28 05:19:57 +
+++ src/diagnostics/assert.cpp	2012-04-10 13:13:23 +
@@ -59,10 +59,16 @@
 
 ///
 
-void assertion_failed( char const *condition, char const *file, int line ) {
+void assertion_failed( char const *condition, 
+   char const *file, 
+   int line,
+   char const *msg) {
   print_stack_trace( cerr );
   throw make_zorba_exception(
-file, line, zerr::ZXQP0002_ASSERT_FAILED, ERROR_PARAMS( condition )
+file, 
+line, 
+zerr::ZXQP0002_ASSERT_FAILED, 
+( msg ? ERROR_PARAMS( condition, msg ) : ERROR_PARAMS( condition ))
   );
 }
 

=== modified file 'src/diagnostics/assert.h'
--- src/diagnostics/assert.h	2012-03-28 05:19:57 +
+++ src/diagnostics/assert.h	2012-04-10 13:13:23 +
@@ -29,12 +29,18 @@
  * @param condition The string representation of the condition that failed.
  * @param file The C++ source-code file name where the assertion failed.
  * @param line The C++ source-code line number where the assertion failed.
+ * @param msg An optional message that is output if the assertion fails.
  * @throws ZXQP0002_ASSERT_FAILED
  */
-void assertion_failed( char const *condition, char const *file, int line );
+void assertion_failed( char const *condition,
+   char const *file, 
+   int line, 
+   char const *msg = 0);
 
 /**
  * Zorba version of the standard assert(3) macro.
+ * Is checked in RELEASE mode as well. And outputs a special
+ * error code with the failing condition.
  */
 #define ZORBA_ASSERT(COND)  \
   do {  \
@@ -44,6 +50,22 @@
 }   \
   } while (0)
 
+/**
+ * Zorba version of the standard assert(3) macro.
+ * Is checked in RELEASE mode as well. And outputs a special
+ * error code with the failing condition as well as potentially
+ * useful information for further debugging.
+ */
+#define ZORBA_ASSERT_WITH_MSG(COND,MSG)\
+  do { \
+if ( !(COND) ) {   \
+  std::ostringstream oss;  \
+  oss << MSG;  \
+  zorba::assertion_failed( #COND, __FILE__, __LINE__, oss.str().c_str() ); \
+  throw 0; /* never gets here but suppresses warning */\
+}  \
+  } while (0)
+
 } // namespace zorba
 #endif /* ZORBA_ASSERT_H */
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2012-03-28 05:19:57 +
+++ src/diagnostics/diagnostic_en.xml	2012-04-10 13:13:23 +
@@ -1589,7 +1589,7 @@
A Zorba programming assertion failed.  If this error occurs, it is a bug
and should be reported.
   
-  "$1": assertion failed
+  "$1": assertion failed.${ The following information might help: 2}
 
 
 

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2012-03-28 05:19:57 +
+++ src/diagnostics/pregenerated/dict_en.cpp	2012-04-10 13:13:23 +
@@ -392,7 +392,7 @@
   { "ZXQD0006", "\"$1\": invalid UTF-8 byte sequence" },
   { "ZXQP", "no error" },
   { "ZXQP0001", "dynamic runtime error${: 1}" },
-  { "ZXQP0002", "\"$1\": assertion failed" },
+  { "ZXQP0002", "\"$1\": assertion failed.${ The following information might help: 2}" },
   { "ZXQP0003", "internal error${: 1}" },
   { "ZXQP0004", "not yet implemented: $1" },
   { "ZXQP0005", "\"$1\": feature not enabled" },

=== modified file 'src/runtime/collections/collecti