version 6.5
Process aborted Boolean
Parameter | Type | Description | ||||
This command does not require any parameters | ||||||
Function result | Boolean | True = the process is about to be aborted, | ||||
False = the process is not about to be aborted |
Description
The Process aborted command returns True if the process in which it is called is about to be interrupted unexpectedly, which means that the execution of the command was unable to reach its "normal" completion. For example, this can occur after calling QUIT 4D.
Example
This command can be used as a particular type of programming on the Web server, only in compiled mode. When you use a method to send Web pages by using a loop like While...End while (see example), the mechanism of the Web server doesn't allow you to stop the loop in case of a timeout (end of the inactivity period authorized) on a Web browser. If the Web process is not closed, a context is therefore still in use.
The Process aborted command, placed in the initial test of the loop, will return True in case of a timeout. The loop can then be interrupted and the process can be aborted.
Here is a method that can be used to send HTML pages. In compiled mode, this loop cannot be interrupted in case of a timeout:
While (True) SEND HTML FILE (HTMLFile) End while
The Process aborted command allows you to use the same type of method, while still being able to exit the loop and abort the Web process in case of a timeout:
While (Not (Process aborted)) SEND HTML FILE (HTMLFile) End while