- Main Page
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# FbxError Class Reference

This reference page is linked to from the following overview topics: List of Python Fbx classes.

Search for all occurrences

## Detailed Description

This class provides access to the last error integer ID and is used for translating from integer error ID to strings.

Internally a FbxError instance maintains a translation table from integer IDs to strings. Note that different classes and systems in FBX (e.g. FbxManager) have different sets of error codes, and maintain different instances of the FbxError class. The translation table is an array of strings (char*) and the index into the string table is assumed to be the error number.

See also:
  FbxManager::EErrorCode
  FbxManager::GetError()

Definition at line 32 of file fbxerror.h.

`#include <fbxerror.h>`

List of all members.

## Public Member Functions
| FbxError ()
| Default constructor.
| FbxError (const char *pStringArray[], int pErrorCount)
| Creates a FbxError from an array of strings.
| ~FbxError ()
| Destructor.
void | Reset (const char *pStringArray[], int pErrorCount)
| Reset the object (clears the last error) and use the received error string table.
int | GetErrorCount () const
| Get the size of the error string table.
const char * | GetErrorString (int pIndex) const
| Get the error message string.
void | SetLastError (int pIndex, const char *pString)
| Set the last error ID and the last error string.
void | SetLastErrorID (int pIndex)
| Set the last error index.
int | GetLastErrorID () const
| Return the last error index.
const char * | GetLastErrorString () const
| Get the message string associated with the last error.
void | SetLastErrorString (const char *pString)
| Set the message string associated with the last error.
void | ClearLastError ()
| Reset the last error.

## Constructor & Destructor Documentation

FbxError | ( |  | ) |

Default constructor.

FbxError | ( | const char * | pStringArray[],
|  | int | pErrorCount
| ) |  |

Creates a FbxError from an array of strings.

An error code is treated as index into the array of strings when looking up the error code.

Parameters:

  pStringArray | The error string table in use.
  pErrorCount | Number of elements in the error string table.

~FbxError | ( |  | ) |

Destructor.

## Member Function Documentation

void Reset | ( | const char * | pStringArray[],
|  | int | pErrorCount
| ) |  |

Search for all occurrences

Reset the object (clears the last error) and use the received error string table.

Parameters:

  pStringArray | The error string table in use.
  pErrorCount | Number of elements in the error string table.

int GetErrorCount | ( |  | ) | const

Search for all occurrences

Get the size of the error string table.

Returns:
  Number of elements in the error string table.

const char* GetErrorString | ( | int | pIndex | ) | const

Search for all occurrences

Get the error message string.

Parameters:

  pIndex | Error index.

Returns:
  Error string.

void SetLastError | ( | int | pIndex,
|  | const char * | pString
| ) |  |

Search for all occurrences

Set the last error ID and the last error string.

Parameters:

  pIndex | Error index.
  pString | Error string.

Remarks:
  This method will also set the last error string to the default string value contained in the error string table for this error ID.

void SetLastErrorID | ( | int | pIndex | ) |

Search for all occurrences

Set the last error index.

Parameters:

  pIndex | Error index.

Remarks:
  This method will also set the last error string to the default string value contained in the error string table for this error index.

int GetLastErrorID | ( |  | ) | const

Search for all occurrences

Return the last error index.

Returns:
  The last error index or -1 if none is set.

const char* GetLastErrorString | ( |  | ) | const

Search for all occurrences

Get the message string associated with the last error.

Returns:
  Error string or empty string if none is set.

Examples:
  ExportScene03/main.cxx, and ViewScene/SceneContext.cxx.

void SetLastErrorString | ( | const char * | pString | ) |

Search for all occurrences

Set the message string associated with the last error.

Parameters:

  pString | Error string. This method should be called after FbxError::SetLastErrorID() in order to customize the error string.

void ClearLastError | ( |  | ) |

Search for all occurrences

Reset the last error.

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

- fbxsdk/core/base/fbxerror.h

FbxError FbxError FbxError FbxError FbxError FbxError FbxError FbxError FbxError FbxError
FbxError FbxError FbxError FbxError FbxError FbxError FbxError FbxError FbxError FbxError