#include <dom.h>
|
|
| DOMEvalException (const std::string &errorMsg_, const xercesc::DOMNode *n) |
| |
|
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 |
| |
|
xercesc::DOMNode::NodeType | getNodeType () const |
| |
|
|
static bool | isHTMLOutputEnabled () |
| |
|
static void | htmlEscaping (std::string &msg) |
| |
|
|
| DOMEvalException (const std::string &errorMsg_, const xercesc::DOMLocator &loc) |
| |
|
|
bool | subsequentError {false} |
| |
|
std::string | errorMsg |
| |
|
std::vector< EmbedDOMLocator > | locationStack |
| |
|
std::string | whatStr |
| |
|
xercesc::DOMNode::NodeType | nodeType { static_cast<xercesc::DOMNode::NodeType>(-1) } |
| |
|
|
class | DOMParser |
| |
|
class | DOMErrorPrinter |
| |
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.
◆ convertToString()
| 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) |
| basefile | Same as file but only the basename without any path |
| 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 XML XPath expression from the root element of the file to the element in the file where the error occurred. |
| (the Clark-notation is used for full qualified element names) hrxpath | More human readable variant of xpath. | (strict XML-notation with namespace prefixes is used, where each prefix is short, unique and a human understandable abbreviation of the namespace URI. | But no exact mapping from a prefix to the corresponding namespace URI exist) shorthrxpath | Same as hrxpath but only the last 3 path parts are returned | (if the path is longer it starts with '...', hence it not a valid XML- nor Clark-notation but should still be human readable) ecount | The embed count number where the error occurred sse | This sub-expression is only defined (with a unspecified value) if the error 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 If the value for MBXMLUTILS_ERROROUTPUT starts with 'HTMLOUTPUT:' then HTML escaping is used for messages
The documentation for this class was generated from the following files:
- /mbsim-env/openmbv/mbxmlutils/mbxmlutilshelper/dom.h
- /mbsim-env/openmbv/mbxmlutils/mbxmlutilshelper/dom.cc