Skip to main content

ABORT, ABORTE, ABORTM

Terminates program execution and returns to MVBasic shell.

Synopsis

ABORT [errcode [,val1[,val2]]]
ABORTE [errcode [,val1[,val2]]]
ABORTM [message]

Arguments

errcode Optional — A MultiValue error code; commonly (but not always) specified as a positive integer. The error code can be specified as a literal or as a expression that resolves to a literal value. A non-numeric literal value must be specified as a quoted string.
val Optional — A comma-separated list of one or more literal values to insert into the error message corresponding to errcode. These insert values can be specified as literals or as expressions that resolves to a literal value. A non-numeric literal value must be specified as a quoted string.
message Optional — An expression that resolves to a literal error message text, specified as a quoted string.

Description

The ABORT statements are used to terminate program execution and return to the MVBasic shell programming prompt. If an argument is specified, they use this argument to display an error message before terminating program execution.

  • ABORTE with an specified argument uses the ERRMSG file to obtain the error message to display. For a list of error codes and corresponding error messages, see Error Messages in the Caché MultiValue Commands Reference.

  • ABORTM with an specified argument uses the literal message as the error message to display.

  • ABORT in Caché MVBasic is functionally identical to ABORTE. Depending on the emulation setting, ABORT in other MultiValue emulations may be functionally identical to either ABORTE or ABORTM.

An abort operation resets the @LEVEL system variable to 0.

ABORT and STOP

The ABORT command terminates all program execution and returns to the programming prompt. The STOP terminates the executing routine and returns control to the calling routine.

During debugging, STOP terminates the debugging session. The debugger treats an ABORT as an error condition; the debugger performs a break operation to allow for examination of the condition causing the ABORT.

See Also

FeedbackOpens in a new tab