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.
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.