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

2013-02-06 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/zorba-error_printer_in_api into 
lp:zorba failed. Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 
(message):
  Validation queue job zorba-error_printer_in_api-2013-02-07T00-11-30.914Z is
  finished.  The final status was:

  

  2 tests did not succeed - changes not commited.


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

-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2013-02-06 Thread Paul J. Lucas
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2013-02-05 Thread Paul J. Lucas
Also, does the 28msec code rely on the  being like:

  static error

or will:

  static

still work?
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2013-02-05 Thread Paul J. Lucas
Actually, in the short term, I'd like to revert the way the error code is 
printed to:

err:XPST0003

and merge the branch into the trunk immediately because this branch actually 
makes testing the branch for bug 786 much easier.  I'll file a separate bug 
to change the form to:

http://www.w3.org/2005/xqt-errors"; local-name="XPST0003"/>

for 3.0.

OK?
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2013-02-03 Thread Paul J. Lucas
> It would make sense to me but the problem is that the change is not backwards 
> compatible.
> I know that 28msec relies on it.
> on the current way the error is reported.

There were other mistakes that whoever coded the original XML made.  For 
example, not including a xmlns="..." attribute on the  element; 
omitting the  information; using localized strings for the 
 value (this is one case where the string should NOT be localized).

Will those changes break 28msec as well?
Can't we just update the 28msec code?
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2013-02-03 Thread Matthias Brantner
> The error code was printed in XML as:
> 
>   err:XPST0003
> 
> I think it's better to print it as:
> 
>   http://www.w3.org/2005/xqt-errors#XPST0003
> 
> (as suggested in ).
> But is it better still to print it as:
> 
>   http://www.w3.org/2005/xqt-errors"; prefix="err"
> localname="XPST0003"/>
> 
> ?
It would make sense to me but the problem is that the change is not backwards 
compatible. I know that 28msec relies on it.
on the current way the error is reported.

-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2013-02-03 Thread Paul J. Lucas
The error code was printed in XML as:

  err:XPST0003

I think it's better to print it as:

  http://www.w3.org/2005/xqt-errors#XPST0003

(as suggested in ).
But is it better still to print it as:

  http://www.w3.org/2005/xqt-errors"; prefix="err" 
localname="XPST0003"/>

?
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2012-12-20 Thread Paul J. Lucas
I've done a lot of clean-up.  You have the basic implementation correct.  I've 
moved several functions inline.  I've moved the printing of the stack trace 
constants to XQueryException since only XQueryException has stack traces.  I've 
added doxygen comments that you didn't.

Why don't you include the "raised at" in the XML format?

Why don't you include the "applied at" in the XML format?  (Not knowing what it 
is is not an acceptable reason.)

Why does ErrorPrinter need to exist at all?  It seems redundant.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2012-12-17 Thread David Graf
> I just checked: ZorbaException already has a global
> operator<<(ostream&,ZorbaException const&) function defined for it.
> 
> So why do you need to do anything at all?
Hi Paul, sorry for not following up for a long time. We just need it to get the 
errors in xml format. I guess this is not supported in 
operator<<(ostream&,ZorbaException const&). I will investigate in the stream 
manipulators. Hopefully, I understand how it works!
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2012-11-16 Thread Paul J. Lucas
I just checked: ZorbaException already has a global 
operator<<(ostream&,ZorbaException const&) function defined for it.

So why do you need to do anything at all?
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2012-11-16 Thread Paul J. Lucas
> Anyway, Paul, can you help me on one thing please? Can you tell me how I can
> use this ErrorPrinter for warnings too?

An XQueryWarning is just a typedef for XQueryException, so it should just work 
as-is.

That aside: generally, I don't like to decide for the user how errors should be 
printed.  By putting an error-printer in the public API, you're essentially 
making that decision for them.  If you're going to do that, you could just 
define operator<<(ostream&,ZorbaException const&) and then << would just work.

If you want to set parameters (like XML or indentation), then the nice way to 
do it is via stream manipulators, e.g.:

// ...
}
catch ( XQueryException const &e ) {
  cout << XQueryException::as_xml << XQueryException::indent( 2 ) << e;
}

You can look at src/util/indent.h for how to do this kind of thing.  The above 
manipulators, however, should be "one-shot" and auto-reset (which is trivial to 
do).
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2012-11-16 Thread David Graf
Cool, now I can fix what someone else did wrong :-(. 

Anyway, Paul, can you help me on one thing please? Can you tell me how I can 
use this ErrorPrinter for warnings too?

> It's a stupid API.  There's no reason to have a class with a single static
> member function.  If you're going to make it public, it needs to be better.
> Two things come to mind:
> 
> 1. (Trivial) Simply make it a global function -- no need for a class.
> 
> 2. (Less trivial) Create a (real) ErrorPrinter class that holds the
> configuration parameters; then using operator<<, you can write an
> XQueryException to it.
> 
> 3. Regardless, the indentation parameter should be an unsigned int (not a
> bool): it will specify a multiplier for the amount of indentation (where 0 =
> none).
> 
> BTW: It should take a ZorbaException, not an XQueryException.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2012-11-15 Thread Paul J. Lucas
Review: Disapprove

It's a stupid API.  There's no reason to have a class with a single static 
member function.  If you're going to make it public, it needs to be better.  
Two things come to mind:

1. (Trivial) Simply make it a global function -- no need for a class.

2. (Less trivial) Create a (real) ErrorPrinter class that holds the 
configuration parameters; then using operator<<, you can write an 
XQueryException to it.

3. Regardless, the indentation parameter should be an unsigned int (not a 
bool): it will specify a multiplier for the amount of indentation (where 0 = 
none).

BTW: It should take a ZorbaException, not an XQueryException.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2012-11-15 Thread Matthias Brantner
Review: Approve

I approve but I want to make sure the same or similar functionality (maybe 
without XML printing) is not already available in the API. Hence, I added Paul.
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2012-11-15 Thread William Candillon
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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/zorba-error_printer_in_api into lp:zorba

2012-11-14 Thread David Graf
It would be good to use this error printer for the warning reporter too. But I 
didn't figure out how that should work yet? Can you guys help?
-- 
https://code.launchpad.net/~zorba-coders/zorba/zorba-error_printer_in_api/+merge/134405
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