CLEAR.ABORT

CLEAR.ABORT

Top  Previous  Next

 

The CLEAR.ABORT command clears the abort status in an ON.ABORT paragraph.

 

 

Format

 

CLEAR.ABORT

 

 

When an application generates an abort event, QM discards all programs, paragraphs, menus, etc running in the process and returns to the command processor. Before displaying the command prompt, the system checks for an ON.ABORT item in the VOC (usually a paragraph) and, if found, executes it.

 

The ON.ABORT paragraph is intended as a means of preventing a user ever arriving at the command prompt if the application fails. Typically, the ON.ABORT paragraph simply terminates the session but it might log the event or perform other processing. If the processing in the ON.ABORT paragraph causes a further abort, the session is terminated.

 

Sometimes, it may be useful to restart the application from the ON.ABORT paragraph. In this case, a further abort should probably re-enter the ON.ABORT paragraph. The normal action of automatic termination of the session on the second abort can be suppressed by clearing the abort status in the ON.ABORT paragraph. It then becomes the developer's responsibility to avoid endless loops if the ON.ABORT action generates a further abort.

 

Use of the CLEAR.ABORT command also sets the @ABORT.CODE variable to zero.

 

 

See also:

ABORT command, QMBasic ABORT statement