4D v12.4

Process aborted

Home

 
4D v12.4
Process aborted

 

Process aborted 


 

Process aborted -> Function result 
Parameter Type   Description
Function result  Boolean in True = the process is about to be aborted, False = the process is not about to be aborted

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

 
PROPERTIES 

Product: 4D
Theme: Processes
Number: 672

 
HISTORY 

Created: 4D v6.5