Scroll to navigation

GOLF(2gg) Development GOLF(2gg)

NAME

exit-handler - (program-flow)

PURPOSE

Exit current request processing.

SYNTAX

exit-handler [ <request status> ]

DESCRIPTION

Exits current request by transferring control directly after the top-level request dispatcher. If there is an after-handler, it will still execute, unless exit-handler is called from before-handler.

<request status> number is a request status returned to the caller (see exit-status); if not specified, then it's the value specified in the last executed exit-status statement; if none executed, then it's 0.

EXAMPLES

Returning status of 20:

begin-handler /req-handler public

...
exit-status 20
...
exit-handler
... end-handler

Returning status of 0:

begin-handler /req-handler public

...
exit-handler
... end-handler

Returning status of 10:

begin-handler /req-handler public

...
exit-handler 10
... end-handler

SEE ALSO


Program flow

break-loop call-handler code-blocks continue-loop do-once exit-handler if-defined if-true quit-process return-handler start-loop See all documentation

$VERSION $DATE