logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

return-handler - (program-flow)

Description

Returns from current request handler by transferring control back to its caller. If the current request handler is handling an external request (such as from a web browser, API, command line etc.), then return-handler is equivalent to exit-handler. If the current request handler was handling an internal request (i.e. called from another request handler with call-handler), then control transfers back to that handler immediately after call-handler. For internal requests, the number <return value> will be passed back to the caller, who can obtain it via "return-value" clause in call-handler. If <return value> is omitted, then it is assumed to be 0. If current request handler is handling an external request, then <return value> will also set the handler's exit status (see exit-status and exit-handler).

Examples

In this example, "req-handler" (the caller) will call "other-handler" (the callee), which will return to the caller (immediately after call-handler). Here's the caller: begin-handler /req-handler public ... call-handler "/other-handler" return-value rval ... end-handler The callee handler: begin-handler /other-handler public ... return-handler 5 ... end-handler The value of "rval" in the caller will be 5.

Name

return-handler - (program-flow)

Purpose

Return from current request handler back to its caller.

See Also

Program flow break-loopcall-handlercode-blockscontinue-loopdo-onceexit-handlerif-definedif-truequit-processreturn-handlerstart-loop See all documentation $DATE $VERSION GOLF(2gg)

Syntax

return-handler [ <return value> ]

See Also