IGame/IGameError.h File Reference

IGameError.h File Reference
#include "../maxheap.h"
#include "IGameStd.h"

File Description

IGame Error Access.

Internal IGame methods maintain a global error state, these methods provide access to this data. Many IGame methods return pointers or boolean status flags. If either of these are null or false, then these methods can be used to access the error.

Classes

class  IGameErrorCallBack
 Error callback. More...
 

Enumerations

enum  IGameError {
  IG_NO_ERROR, IG_NO_KEY_INTERFACE, IG_INDEX_OUT_OF_BOUNDS, IG_ERROR_LOADING_PROPERTIES_FILE,
  IG_COM_ERROR, IG_NODE_NOT_FOUND, IG_UNSUPPORTED_CONT, IG_OBJECT_NOT_SUPPORTED,
  IG_MAPPING_CHANNEL_ERROR, IG_MATERIAL_ERROR, IG_NO_SKIN_MOD, IG_NO_CONTROLLER_KEY,
  IG_NO_NORMALS
}
 Enumeration of the Error codes produced by IGame. More...
 

Functions

IGAMEEXPORT IGameError GetLastIGameError ()
 Retrieve the last error set by the system. More...
 
IGAMEEXPORT const MCHARGetLastIGameErrorText ()
 Get the detailed description of the last error set by the system. More...
 
IGAMEEXPORT void SetErrorCallBack (IGameErrorCallBack *proc)
 Set the callback for the error logging. More...
 
IGAMEEXPORT void ResetError ()
 Reset the last error stored by the system. More...
 

Enumeration Type Documentation

enum IGameError

Enumeration of the Error codes produced by IGame.

Enumerator
IG_NO_ERROR 

No Error.

IG_NO_KEY_INTERFACE 

No Key interface for the controller.

IG_INDEX_OUT_OF_BOUNDS 

The index into the array is out of bounds.

IG_ERROR_LOADING_PROPERTIES_FILE 

Errors finding or parsing the Properties file.

IG_COM_ERROR 

Various COM errors.

IG_NODE_NOT_FOUND 

IGameNode not found.

IG_UNSUPPORTED_CONT 

The controller for the basic type is not supported.

IG_OBJECT_NOT_SUPPORTED 

Object not supported by IGame.

IG_MAPPING_CHANNEL_ERROR 

Mapping Channel not found.

IG_MATERIAL_ERROR 

Material not found.

IG_NO_SKIN_MOD 

No skin modifier.

IG_NO_CONTROLLER_KEY 

No Keys set on the controller.

IG_NO_NORMALS 

No indexed normal array created.

29 {
30  IG_NO_ERROR,
34  IG_COM_ERROR,
43 };
Material not found.
Definition: IGameError.h:39
No Key interface for the controller.
Definition: IGameError.h:31
The controller for the basic type is not supported.
Definition: IGameError.h:36
Various COM errors.
Definition: IGameError.h:34
Object not supported by IGame.
Definition: IGameError.h:37
IGameNode not found.
Definition: IGameError.h:35
The index into the array is out of bounds.
Definition: IGameError.h:32
No indexed normal array created.
Definition: IGameError.h:42
Errors finding or parsing the Properties file.
Definition: IGameError.h:33
Mapping Channel not found.
Definition: IGameError.h:38
No skin modifier.
Definition: IGameError.h:40
No Keys set on the controller.
Definition: IGameError.h:41
No Error.
Definition: IGameError.h:30

Function Documentation

IGAMEEXPORT IGameError GetLastIGameError ( )

Retrieve the last error set by the system.

Returns
The error code
IGAMEEXPORT const MCHAR* GetLastIGameErrorText ( )

Get the detailed description of the last error set by the system.

Returns
The error text
IGAMEEXPORT void SetErrorCallBack ( IGameErrorCallBack proc)

Set the callback for the error logging.

Parameters
*procA pointer the the IGameErrorCallback object created by the developer
IGAMEEXPORT void ResetError ( )

Reset the last error stored by the system.

The global error will only change when IGame sets the last error. Using this method will override it.