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

#include <Any.h>

Public Member Functions

 IndexOutOfBounds ()
 IndexOutOfBounds (const Data *data, int i, int s)
- Public Member Functions inherited from G3D::ParseError
 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

int index
int size
- Public Attributes inherited from G3D::ParseError
std::string filename
int64 byte
int line
int character
std::string message

Additional Inherited Members

- Public Types inherited from G3D::ParseError
enum  { UNKNOWN = -1 }

Detailed Description

Thrown by operator[] when an array index is not present.

Constructor & Destructor Documentation

G3D::Any::IndexOutOfBounds::IndexOutOfBounds ( )
385 : index(0), size(0) {}
int size
Definition: Any.h:384
int index
Definition: Any.h:383
G3D::Any::IndexOutOfBounds::IndexOutOfBounds ( const Data data,
int  i,
int  s 
386  : index(i), size(s) {
387  if (data) {
388  filename = data->source.filename;
389  line = data->source.line;
390  character = data->source.character;
391  }
392  message = format("Index out of bounds: index = %d, array size = %d", i, s);
393  }
int line
Definition: ParseError.h:37
int size
Definition: Any.h:384
int index
Definition: Any.h:383
std::string filename
Definition: ParseError.h:27
int character
Definition: ParseError.h:42
std::string __cdecl format(const char *fmt...) G3D_CHECK_PRINTF_ARGS
std::string message
Definition: ParseError.h:44

+ Here is the call graph for this function:

Member Data Documentation

int G3D::Any::IndexOutOfBounds::index
int G3D::Any::IndexOutOfBounds::size

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