2.10.1.1. report_report()
[<<<] [>>>]
This function implements the default error reporting function for both run-time and parse time errors and
warnings.
void report_report(void *filepointer,
char *FileName,
long LineNumber,
unsigned int iErrorCode,
int iErrorSeverity,
int *piErrorCounter,
char *szErrorString,
unsigned long *fFlags
){
Aguments:
- filepointer is a void * pointer. The default value of this pointer is stderr unless the
variation sets it different. This implementation uses this pointer as a FILE * pointer. Other implementations
of this function may use it for any other purpose so long as long the usage of this pointer fits the variation.
- FileName is the name of the source file where the error was detected. This parameter is NULL in case of
a run-time error. The reporting function is encouraged to display this information for the user.
- LineNumber is the line number within the source file where the error has happened. This parameter is valid
only in case the parameter FileName is not NULL
- iErrorCode is the error code.
- iErrorSeverity should define the severity of the error. It can be
REPORT_INFO,
REPORT_WARNING,
REPORT_ERROR,
REPORT_FATAL,
REPORT_INTERNAL.
Whenever the error severity is above the warning level the *piErrorCounter has to be incremented.
- piErrorCounter points to an int counter that counts the number of errors. If there are errors
during syntax analysis the ScriptBasic interpreter stops its execution before starting execution.
- szErrorString is an optional error parameter string and not the displayable error message.
The error message is stored in the global constant array en_error_messages. This string may
contain a %s control referring to the error parameter string.
- fFlags is an unsigned long bit field. The bits currently used are:
REPORT_F_CGI is set if the error is to be reported as a CGI script. See the code for more details.
REPORT_F_FRST is reset when the report function is called first time and is set by the report function.
This allows the report function to report a header in case it needs.
Other bits are reserved for later use.
[<<<] [>>>]