3ds Max C++ API Reference
IGameError.h File Reference

IGame Error Access. More...

#include "../maxheap.h"
#include "IGameStd.h"
#include "../strbasic.h"

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...
 

Detailed 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.

Enumeration Type Documentation

◆ IGameError

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.

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

Function Documentation

◆ GetLastIGameError()

IGAMEEXPORT IGameError GetLastIGameError ( )

Retrieve the last error set by the system.

Returns
The error code

◆ GetLastIGameErrorText()

IGAMEEXPORT const MCHAR* GetLastIGameErrorText ( )

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

Returns
The error text

◆ SetErrorCallBack()

IGAMEEXPORT void SetErrorCallBack ( IGameErrorCallBack proc)

Set the callback for the error logging.

Parameters
*procA pointer the the IGameErrorCallback object created by the developer

◆ ResetError()

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.