mbxmlutils 1.3.0 Multi-Body XML Utils

Public Member Functions | Protected Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
MBXMLUtils::DOMEvalException Class Reference

`#include <dom.h>`

Inheritance diagram for MBXMLUtils::DOMEvalException:
[legend]

## Public Member Functions

| 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

## Protected Member Functions

| DOMEvalException (const std::string &errorMsg_, const xercesc::DOMLocator &loc)

## Static Private Member Functions

static std::string | convertToString (const EmbedDOMLocator &loc, const std::string &message, bool subsequentError=false)

## Private Attributes

bool | subsequentError {false}
std::string | errorMsg
std::vector< EmbedDOMLocator > | locationStack
std::string | whatStr
xercesc::DOMNode::NodeType | nodeType { static_cast<xercesc::DOMNode::NodeType>(-1) }

## Friends

class | DOMParser
class | DOMErrorPrinter

## Detailed Description

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.

## Member Function Documentation

## ◆ convertToString()

string MBXMLUtils::DOMEvalException::convertToString | ( | const EmbedDOMLocator & | loc,
|  | const std::string & | message,
|  | bool | subsequentError = `false`
| ) |  |

static private

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

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