From Xojo Documentation
This event gets called if the script could not be compiled due to a syntax error in the code. Return True to stop the compilation and prevent further errors/warnings.
XojoScriptLocation contains information about the location in the script containing the error.
Scripting Errors shows the enumeration for all the available error messages.