See also: compiling and debugging, err, #err.

Compile-time errors

Compile-time errors are generated when compiling macros that contain syntax errors. Macros are compiled before they start. They don't start if there are syntax errors. The first syntax error is displayed in the QM output like "Error in Macro: error description". Compile-time errors are not generated in exe, because in exe the macro is already compiled.


Some compile-time errors and possible reasons/solutions:

Run-time errors

Run-time errors are generated while macro is executed. On a run-time error the macro ends. In the QM output is displayed error description, like "Error (RT) in Macro: error description".


There are three groups of run-time errors:

1. Errors that are generated by QM ("Window not found", "File not found", etc). Such errors can be handled with the err statement. There are also several fatal errors that cannot be handled, such as a noncompiled function containing syntax errors.

2. Errors that are generated using the end statement. Such errors can be handled with err.

3. Exceptions (errors generated by the operating system or components). In most cases it is result of incorrect programming (invalid pointer, division by 0, endless recursion, etc). Exceptions can by handled with err, but you should avoid them if possible.


Some run-time errors and possible reasons/solutions: