|
|
| DOMEvalException (const std::string &errorMsg_, const xercesc::DOMNode *n) |
| |
|
| DOMEvalException (const std::string &errorMsg_, const xercesc::DOMLocator &loc) |
| |
|
| DOMEvalException (const DOMEvalException &src) |
| |
|
DOMEvalException & | operator= (const DOMEvalException &src) |
| |
|
void | appendContext (const xercesc::DOMNode *n, int lineNr=0) |
| |
|
const std::string & | getMessage () const |
| |
|
void | setMessage (const std::string &errorMsg_) |
| |
|
void | setSubsequentError (bool sse) |
| |
|
const char * | what () const noexcept override |
| |
Exception during evaluation of the DOM tree including a location stack. The location stack is generated by the context node n passed to the ctor.
| string MBXMLUtils::DOMEvalException::convertToString |
( |
const EmbedDOMLocator & |
loc, |
|
|
const std::string & |
message, |
|
|
bool |
subsequentError = false |
|
) |
| |
|
staticprivate |
Convert a error location and error message for outputting it to the console. The behaviour of this function can be adapted by the environment variable MBXMLUTILS_ERROROUTPUT. For each error the value of this variable is printed, where the value is interpreted as a "Boost-Extended Format String Syntax", where the following named sub-expressions are recognized:
| named sub-expr | value of the named sub-expression |
| msg | the error message |
| file | the filename where the error occurred (may be relative to the current directory) |
| absfile | same as file but always absolute |
| urifile | same as absfile but URI encoded |
| line | the line number in the file where the error occurred |
| xpath | the XPath expression from the root element of the file to the element in the file where the error occurred |
| ecount | the embed count number where the error occurred |
| sse | undefined value but only defined if this is a subsequent error |
All these named sub-expressions may not be defined (see "Boost-Extended Format Syntax Syntax" on how to handle this). If the environment variable MBXMLUTILS_ERROROUTPUT is not set then the default GCC is used.
The following values for MBXMLUTILS_ERROROUTPUT are interpreted as an internally defined expression: GCC: use gcc style output with color and link escape sequences when stdout is a tty GCCTTY use gcc style output always with color and link escape sequences GCCNONE use gcc style output without any escape sequences HTMLFILELINE: use HTML like output with a link with filename and line number HTMLXPATH: use HTML like output with a link with filename and xpath expression