void EnvErrorCallback(SCENVERROR err, PCStr desc, void *userData); ... ISCEnvDesc envDesc; envDesc.envErrorCallback = EnvErrorCallback; //pointer to your EnvErrorCallback function envDesc.envErrorCallbackUserData = EnvErrorCallbackData; //some data pointer if necessaryThe first parameter of the above callback is an error code (see reference), desc is an optional description, userData is ISCEnvDesc::envErrorCallbackUserData field specified by the user.
void CompileErrorCallback(const SCCompileError *err, void *userData); ... ISCEnvDesc envDesc; envDesc.compileErrorCallback = CompileErrorCallback; envDesc.compileErrorCallbackUserData = CompileErrorCallbackData;The first parameter is a pointer to the error description structure:
typedef struct SCCompileError { SCCOMPERROR code; //code PCStr path; //script path PCStr tokenName; //name of token that error occured at Int row; //y character position (from 1) Int col; //x character position (from 1) PCStr msg; //additional information (optional) ... }SCCompileError;
You can use it to compose your own error information.