Public Member Functions | Public Attributes | Friends

XMLStorage::XMLError Struct Reference

XML Error with message and location. More...

#include <xmlstorage.h>

Collaboration diagram for XMLStorage::XMLError:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XMLError ()
 XMLError (const char *msg)
 XMLError (const XMLLocation &location, const char *msg)
std::string str () const
 return formated error message

Public Attributes

std::string _message
std::string _systemId
int _line
int _column
int _error_code

Friends

std::ostream & operator<< (std::ostream &, const XMLError &err)

Detailed Description

XML Error with message and location.

Definition at line 901 of file xmlstorage.h.


Constructor & Destructor Documentation

XMLStorage::XMLError::XMLError (  ) [inline]

Definition at line 903 of file xmlstorage.h.

     :  _line(0),
        _column(0),
        _error_code(0)
    {
    }
XMLStorage::XMLError::XMLError ( const char *  msg ) [inline]

Definition at line 910 of file xmlstorage.h.

     :  _line(0),
        _column(0),
        _error_code(0),
        _message(msg)
    {
    }
XMLStorage::XMLError::XMLError ( const XMLLocation location,
const char *  msg 
) [inline]

Definition at line 918 of file xmlstorage.h.

     :  _systemId(location.get_path()),
        _line(location.get_line()),
        _column(location.get_column()),
        _error_code(0),
        _message(msg)
    {
    }

Member Function Documentation

std::string XMLStorage::XMLError::str (  ) const

return formated error message

Definition at line 886 of file xmlstorage.cpp.

{
    std::ostringstream out;

    out << *this;

    return out.str();
}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const XMLError err 
) [friend]

Definition at line 713 of file xmlstorage.cpp.

{
    out << err._systemId << "(" << err._line << ")";

    if (err._column > 1)
        out << " [column " << err._column << "]";

    out << " : " << err._message;

    return out;
}

Member Data Documentation

Definition at line 934 of file xmlstorage.h.

Definition at line 935 of file xmlstorage.h.

Definition at line 933 of file xmlstorage.h.

Definition at line 931 of file xmlstorage.h.

Definition at line 932 of file xmlstorage.h.


The documentation for this struct was generated from the following files: