Skip to main content
Skip table of contents

ErrorToString [LJM User's Guide]

Get the name of an error code.

Syntax

LJM_VOID_RETURN LJM_ErrorToString(
int ErrorCode,
char * ErrorString)

Parameters

ErrorCode [in]

The error code number.

ErrorString [out]

A pointer to the char array which will be populated with the null-terminated error name/description. Allocate to size LJM_MAX_NAME_SIZE.

Returns

None.

Remarks

If the constants file that has been loaded does not contain the error code, this returns a null-terminated message saying so. If the constants file could not be opened, this returns a null-terminated string containing the expected file path.

Example

Get the name of error code 1230

C
char errorName[LJM_MAX_NAME_SIZE]; // LJM_MAX_NAME_SIZE is 256
LJM_ErrorToString(1230, errorName);
printf ("%s \n", errorName); // prints "LJME_COULD_NOT_CLAIM_DEVICE"
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.