GOLF(2gg)
π GOLF(2gg) β the manual, but make it cute π
okay bestie, sit down, we're doing the 2gg golf manual together and honestly? this one's a lil bop. it's GOLF(2gg), from the Development</> section, and today's main character is exit-handler. ποΈβοΈβ¨
πΈ NAME πΈ
exit-handler β no cap, it's all about (program-flow) π¦
π PURPOSE π
Exit current request processing. that's it, that's the whole vibe. girl said "I'm out" and meant it π
β¨ SYNTAX β¨
exit-handler [ <request status> ]
π DESCRIPTION π
So here's the tea π΅ β exit-handler exits the current request by transferring control directly after the top-level request dispatcher. Like, not just "I'm leaving the room", it's "I'm leaving the building, straight past the dispatcher, don't talk to me". πͺπ¨
But WAIT. if there's an after-handler, bestie, it still runs. it will still execute. periodt. π«Ά
β οΈ the ONE exception: if exit-handler is called from before-handler, then nope, the after-handler does not run. read that again. it matters. π
Now about <request status> β that number is the request status returned to the caller (peep exit-status for the full lore π). And the defaults are lowkey a whole chain:
- if you don't specify it, then it's the value specified in the last executed
exit-statusstatement; - if none was executed, then it's
0. iconic. β
π 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 how the middle one just... doesn't say a number? that's the default doing its lil thing. slay. β¨
π¦ 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
yes bestie, exit-handler is listed in its own SEE ALSO. she's self-referential AND self-confident. main character energy fr fr ππ
okay that's the whole page, you ate that ππ β this was version $VERSION, dated $DATE, and yes those came straight from the footer, we don't skip footers in this house. bye bestie!! πβ
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms