If the Flexnet Embedded enabled application produces an error during runtime it is often useful to track down the source of the error.
If the Flexnet Embedded enabled application produces an error during runtime it is often useful to track down the source of the error. To do this, the Flexnet Embedded API contains a number of function calls that can be used to return pertinent information about the error. This KB article provides information regarding these functions.
Most FlxName functions follow the convention whereby a FlxBool is the return type and a FlxErrorRef parameter is passed as the last argument. The return value is FLX_TRUE if the function action was performed successfully and FLX_FALSE if it failed. In the case of failure, the FlxErrorRef object is filled with the relevant information.
An Error object contains the following information:
Public, internal, or external.
Error code that represents a specific error condition.
Error code returned by the OS or environment, if applicable.
Reference to the location in code where the error occurred.
Additional error information set by the implementer in external functions.
To retrieve the information contained in each of these objects use the following function calls:
FlxErrorGetError, FlxErrorGetCategory, FlxErrorGetSystem, FlxErrorGetLocationUnit and FlxErrorGetLocationHint
Once the additional information has been retrieved using these codes it should be possible to determine the category of the error.
If the error is from the public category then consult FlxErrorCode enumeration found in FlxError.h header file located in the include directory of the toolkit. The list contains the error code along with the comment describing the error, and will generally be an error which can be resolved by the publisher. Consult the appropriate publisher error documentation for information in helping to track down where the error is coming from. If further assistance is required then please contact Flexera Technical Support who may be able to help further in tracking down this error.
If the category of the error is internal, then call the function FlxErrorGenerateReport and send the generated string through to Flexera Technical support who will assess this as a bug and report it to engineering.
If the category is a callout error (these are new in the next release), consult FlxCalloutErrorCode enumeration in FlxError.h or ErrorDefs.h. Search callout code for use of that error code, and attempt to diagnose which callout operation failed. A call to FlxErrorGetLocationUnit should return a member of the enumeration FlxCalloutUnitIdentifier which should help you track down the right source file, whilst FlxErrorGetLocationHint should match the value passed in the call to FlxSetCalloutError.
If the category is an external error then the code is publisher specific and Flexera would not have any information regarding this error. When an external error is reported using FlxSetExternalError, the ?location? parameter is a publisher specific and should be used to enable them to track down the error.