server/dep/include/g3dlite/G3D/ParseError.h
Lynx3d ae3ad10bcf [10097] Update G3D up to v8.0b4
+ Got rid of zip lib requirement in G3D...
  Still can re-enable code by defining _HAVE_ZIP...

+ Remove silly X11 lib dependency from G3D
  Code doesn't seem to do anything yet anyway, and even if, we don't want it :p

+ Fix another weird G3D build problem...

+ Remove some __asm usage in g3d, which is not available on Win64
  My editor also decided to remove a ton of trailing white spaces...tss...

+ Reapply G3D fixes for 64bit VC

+ not use SSE specific header when SSE not enabled in *nix

+ Updated project files

+ New vmap_assembler VC90/VC80 Project

+ vmap assembler binaries updates

NOTE: Old vmap fikes expected work (as tests show) with new library version.
      But better use new generated versions. Its different in small parts to bad or good...

(based on Lynx3d's repo commit 44798d3)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-06-23 06:45:25 +04:00

59 lines
1.6 KiB
C++

/**
@file ParseError.h
@maintainer Morgan McGuire
@created 2009-11-15
@edited 2009-11-15
Copyright 2000-2009, Morgan McGuire.
All rights reserved.
*/
#ifndef G3D_ParseError_h
#define G3D_ParseError_h
#include "G3D/platform.h"
#include "G3D/g3dmath.h"
#include <string>
namespace G3D {
/** Thrown by TextInput, Any, and other parsers on unexpected input. */
class ParseError {
public:
enum {UNKNOWN = -1};
/** Empty means unknown */
std::string filename;
/** For a binary file, the location of the parse error. -1 if unknown.*/
int64 byte;
/** 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.
*/
int line;
/** 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.
*/
int character;
std::string message;
ParseError() : byte(UNKNOWN), line(UNKNOWN), character(UNKNOWN) {}
virtual ~ParseError() {}
ParseError(const std::string& f, int l, int c, const std::string& m) :
filename (f), byte(UNKNOWN), line(l), character(c), message(m) {}
ParseError(const std::string& f, int64 b, const std::string& m) :
filename (f), byte(b), line(UNKNOWN), character(UNKNOWN), message(m) {}
};
}
#endif