Tech Tip: When NOT to use the ABORT command
PRODUCT: 4D | VERSION: 12.1 | PLATFORM: Mac & Win
Published On: January 20, 2011
The 4D ABORT command is intended for use from within an error handling project-method, installed using the command ON ERR CALL. When an error of predetermined type occurs the command does not just abort execution of the current method, it aborts the process in which the error occurred.
Developers should be aware when using ABORT of which processes can be aborted. The 4D Abort command should never be used in the 4D Application process since the Application process cannot be aborted.
Calling the ABORT command from within the Application process can have unpredictable negative side effects on the execution of the 4D application.
The ABORT command in the installed method for ON ERR CALL running in the application process actually uninstalls that error handler unless it is re-instantiated.
ie:
` bad code
ON_ERR_CALL("Error_Proc")
some_variable:=Some expression
now the rest of the session runs without an installed error call procedure
unless called again