Error handling
 
 
 

For many member functions of FBX classes, if a call to the function triggers an error:

Here is an example of error-handing code for a file import operation:

const bool lImportStatus =
    myImporter->Initialize(myImportFile, -1, pSdkManager->GetIOSettings() );
if( !lImportStatus ) // Problem with the import file
{
    UI_Printf("Call to KFbxImporter::Initialize() failed.");
    UI_Printf("Error returned: %s", myImporter->GetLastErrorString());
 
    if (myImporter->GetLastErrorID() ==
        KFbxIO::eFILE_VERSION_NOT_SUPPORTED_YET ||
        myImporter->GetLastErrorID() ==
        KFbxIO::eFILE_VERSION_NOT_SUPPORTED_ANYMORE)
        {    // Handle the error...