IN2OSM  1.0.1
parse_error

#include <rapidxml.hpp>

Inheritance diagram for parse_error:
Inheritance graph
Collaboration diagram for parse_error:
Collaboration graph

Public Member Functions

 parse_error (const char *what, void *where)
 Constructs parse error. More...
 
virtual const char * what () const throw ()
 
template<class Ch >
Ch * where () const
 

Private Attributes

const char * m_what
 
void * m_where
 

Detailed Description

Parse error exception. This exception is thrown by the parser when an error occurs. Use what() function to get human-readable error message. Use where() function to get a pointer to position within source text where error was detected.

If throwing exceptions by the parser is undesirable, it can be disabled by defining RAPIDXML_NO_EXCEPTIONS macro before rapidxml.hpp is included. This will cause the parser to call rapidxml::parse_error_handler() function instead of throwing an exception. This function must be defined by the user.

This class derives from std::exception class.

Definition at line 71 of file rapidxml.hpp.

Constructor & Destructor Documentation

◆ parse_error()

parse_error ( const char *  what,
void *  where 
)
inline

Constructs parse error.

Definition at line 77 of file rapidxml.hpp.

78  : m_what(what)
79  , m_where(where)
80  {
81  }
Ch * where() const
Definition: rapidxml.hpp:94
virtual const char * what() const
Definition: rapidxml.hpp:85
const char * m_what
Definition: rapidxml.hpp:101

Member Function Documentation

◆ what()

virtual const char* what ( ) const
throw (
)
inlinevirtual

Gets human readable description of error.

Returns
Pointer to null terminated description of the error.

Definition at line 85 of file rapidxml.hpp.

86  {
87  return m_what;
88  }
const char * m_what
Definition: rapidxml.hpp:101

◆ where()

Ch* where ( ) const
inline

Gets pointer to character data where error happened. Ch should be the same as char type of xml_document that produced the error.

Returns
Pointer to location within the parsed string where error occured.

Definition at line 94 of file rapidxml.hpp.

95  {
96  return reinterpret_cast<Ch *>(m_where);
97  }
Here is the caller graph for this function:

Member Data Documentation

◆ m_what

const char* m_what
private

Definition at line 101 of file rapidxml.hpp.

◆ m_where

void* m_where
private

Definition at line 102 of file rapidxml.hpp.


The documentation for this class was generated from the following file: