ESCRIPTERR_METHOD
Perform script compilation error processing
WTSupported in traditional Synergy on Windows
|
|
USupported on UNIX
|
VSupported on OpenVMS
|
subroutine ESCRIPTERR_METHOD a_type ,n a_message ,a a_filename ,a a_linenum ,n a_textline ,a a_tokennum ,n a_tokenlen ,n
Arguments
a_type
The flag defining the type of error message: D_ERROR(error), D_ALERT (warning), D_INFO (informational text). (n)
a_message
The text of the message. (a)
a_filename
(optional) The name of the file in which the error occurred. (a)
a_linenum
(optional) The line number within the file, at which the error occurred. (n)
a_textline
(optional) The text of the line at which the error occurred. (a)
a_tokennum
(optional) The index of the token within a_textline, at which the error occurred. (n)
a_tokenlen
(optional) The length of a_tokennum. (n)
Discussion
ESCRIPTERR_METHOD is a subroutine that you write and name. The name of your subroutine is registered with UI Toolkit using the E_METHOD subroutine.
UI Toolkit calls your ESCRIPTERR_METHOD subroutine to allow customized script compilation error processing for your application, when using the external routine interface of the Script compiler only.
Once registered, ESCRIPTERR_METHOD will be called when an error occurs while using any of the following routines, defined in Window Scripts.
- %SCR_OPENLIBRARY
- %SCR_CLOSELIBRARY
- %SCR_PROCESS
- %SCR_ERRORCOUNT
If an ESCRIPTERR_METHOD is not registered, the U_START subroutine registers a default routine that displays a message box for each error.
If a_type is set to D_INFO and a_message is blank, a_textline contains the output resulting from a .LOG script command.
There is no maximum length for a_message. The ESCRIPTERR_METHOD routine is responsible for wrapping or truncating the message appropriately.
A_filename can contain up to 256 characters, and is one of the following:
- The name of the script file, if a script file open or syntax error occurred
- The name of the library if a library file open or creation error occurred
- Not passed if not one of the above
A_linenum, a_textline, a_tokennum, and a_tokenlen are only passed if a script syntax error occurred.
A_textline can contain up to 255 characters.
See also
- Accessing the Script compiler using the external routine interface
- Overloading UI Toolkit routines for more information on creating this subroutine
- Appendix D: Methods