TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
G3D::ParseError Class Reference

#include <ParseError.h>

Public Types

enum  { UNKNOWN = -1 }
 

Public Member Functions

 ParseError ()
 
virtual ~ParseError ()
 
 ParseError (const std::string &f, int l, int c, const std::string &m)
 
 ParseError (const std::string &f, int64 b, const std::string &m)
 
std::string formatFileInfo () const
 

Public Attributes

std::string filename
 
int64 byte
 
int line
 
int character
 
std::string message
 

Detailed Description

Thrown by TextInput, Any, and other parsers on unexpected input.

Member Enumeration Documentation

anonymous enum
Enumerator
UNKNOWN 
24 {UNKNOWN = -1};
Definition: ParseError.h:24

Constructor & Destructor Documentation

G3D::ParseError::ParseError ( )
inline
int line
Definition: ParseError.h:37
Definition: ParseError.h:24
int64 byte
Definition: ParseError.h:30
int character
Definition: ParseError.h:42
virtual G3D::ParseError::~ParseError ( )
inlinevirtual
48 {}
G3D::ParseError::ParseError ( const std::string &  f,
int  l,
int  c,
const std::string &  m 
)
inline
50  :
51  filename (f), byte(UNKNOWN), line(l), character(c), message(m) {}
int line
Definition: ParseError.h:37
Definition: ParseError.h:24
int64 byte
Definition: ParseError.h:30
std::string filename
Definition: ParseError.h:27
int character
Definition: ParseError.h:42
std::string message
Definition: ParseError.h:44
G3D::ParseError::ParseError ( const std::string &  f,
int64  b,
const std::string &  m 
)
inline
53  :
54  filename (f), byte(b), line(UNKNOWN), character(UNKNOWN), message(m) {}
int line
Definition: ParseError.h:37
Definition: ParseError.h:24
int64 byte
Definition: ParseError.h:30
std::string filename
Definition: ParseError.h:27
int character
Definition: ParseError.h:42
std::string message
Definition: ParseError.h:44

Member Function Documentation

std::string G3D::ParseError::formatFileInfo ( ) const

If information is known, ends in ": ", otherwise empty

Member Data Documentation

int64 G3D::ParseError::byte

For a binary file, the location of the parse error. -1 if unknown.

int G3D::ParseError::character

Character number (in the line) of the start of the token which caused the exception. 1 is the character in the line. May be -1 if unknown.

std::string G3D::ParseError::filename

Empty means unknown

int G3D::ParseError::line

For a text file, the line number is the line number of start of token which caused the exception. 1 is the first line of the file. -1 means unknown. Note that you can use TextInput::Settings::startingLineNumberOffset to shift the effective line number that is reported by that class.

std::string G3D::ParseError::message

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