Brevity uses a variable of type StatusCodeT to hold an error state. After any function call you should check the value of this variable. If it is non-zero then something is wrong. The following constants define some of the possible types of error that Brevity can return.
Full = 4; // Whatever you have been working with is full. EndOfHitList = 1; // We are at the end of a list eNoError = 0; // NoError; eNoMemory = -1; // Not enough memory eReadOnly = -2; // File is read only eReading = -3; // Error reading from file eWriting = -4; // Error writing to file eSeeking = -5; // We were not able to seek where we wanted eFileNotFound = -6; // Not able to find the file eAcces = -8; // File is locked by another process eFileExists = -9; // File already exists eCantDeleteFile = -10; // For some reason the file can't be deleted eOpeningFile = -11; // Can't open the file specified eClosingFile = -12; // Can't close the file specified eMagicNumberMismatch = -13; // File is not index file or is corrupt eIndexLocked = -14; // Index is locked by another process eNoCurrentKey = -15; // No current key eEndOfWordList = -16; // End of the wordlist eIndexNotLoaded = -17; // The index isn't loaded eGeneralError = -37; // Unlisted error eInvalidPasscode = -42; // An invalid license passcode was entered. eDeletingFile = -44; // Sorry, can't delete the file.
Example
StatusCodeT Status; SumManagerT Brevity; Brevity = ixCreateSummarizer( 0x0011FFFFL, 0x0011FFFFL, &Status ); if ( *Status < 0 ) { printerror( Status ); return; // error } // // code to summarize text goes here // ixDeleteSummarizer( Brevity, &Status ); if ( *Status < 0 ) { printerror( Status ); return; // error }