Documentation on early return from gen_server callbacks using throw #5450
Labels
enhancement
help wanted
Issue not worked on by OTP; help wanted from the community
team:PS
Assigned to OTP team PS
Could you please add documentation on how to early return from
gen_server
callbacks usingthrow
? I found this to be a neat way when dealing with multiple checks before actually processing a request 👍In the above code i have to do multiple checks on any request i am receiving before actually processing the request.
Throw comes in handy to do some sort of pipeline where each
check
condition fails fast (stops the flow) and returns without crashing the server.I am throwing with a suitable
reply
in each of my checks.Could you please add documentation to this , since i find it very very useful .
The text was updated successfully, but these errors were encountered: