Exit
Mon 01 January 2018Syntax
Exit[(1)]
Description
Use the Exit statement to immediately terminate a PeopleCode program. If the Exit statement is executed within a PeopleCode function, the main program terminates.
Note:
Exit(1)
does
not
rollback
iScript transactions. To rollback in an iScript, you can use the SqlExec
built-in function with the parameter of ROLLBACK (
SQLEXEC("ROLLBACK")
) or the MessageBox built-in function with a message error severity
of error. You can also use the built-in function Error, but only if
you are not sending HTML or XML in the error text itself.
Parameters
Field or Control |
Definition |
---|---|
1 |
Use this parameter to rollback database changes. Generally, this parameter is used in PeopleCode programs that affect messages. When used with a message, all database changes are rolled back, errors for the subscription contract are written to the subscription contract error table, and the status of the message is marked to Error. All errors that have occurred for this message are viewable in the message monitor: even those errors detected by the ExecuteEdits method. |
Note: This function takes only numeric values. It fails if you use a Boolean value, True or False.
Returns
None.