11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DescriptionZQUIT (legacy command)Note:This page describes the legacy ZQUIT command. The ZQUIT command is obsoleteas of <strong>Caché</strong> 5.1, and should not be used in new programming. It is described heresolely for compatibility with legacy applications. New Programming should use theZTRAP command with the $ZERROR argument to pass control between errorhandlers. A ZQUIT command in new procedure code will result in a error. Refer to the ZTRAP command for further details.The ZQUIT command exits a coded routine and provides explicit control for error handling.Each time a DO, FOR, or XECUTE command is executed, or a user-defined function isinvoked, <strong>Caché</strong> places return information on the program stack (sometimes called the "callstack"). ZQUIT provides a mechanism whereby a nested error-handling routine can passcontrol to a higher level error handler. ZQUIT re-signals the error condition and causes <strong>Caché</strong>to unwind the program (call) stack.ZQUIT is similar to the QUIT command, but it provides explicit control for error handling.Unlike the QUIT command, ZQUIT can be used only in a coded routine. <strong>Caché</strong> ignoresZQUIT when entered from the programmer prompt.ZQUIT has two forms:• Without an argument.• With an argument.ZQUIT Without an ArgumentArgumentless ZQUIT clears the entire stack.ZQUIT With an ArgumentZQ expression unwinds the stack to another call stack level with a $ZTRAP error handler.The value of expression specifies the number of handler-specified stack levels ZQUITunwinds. If you use 1 as expression, <strong>Caché</strong> unwinds the stack to the first encountered $ZTRAPhandler. If you use 2 as expression, <strong>Caché</strong> unwinds the stack to the second encountered$ZTRAP handler, and so on.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 755

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!