[Redbean] Feature / OnError(status, message) hook (#1103)

This commit is contained in:
BONNAURE Olivier 2024-02-14 10:55:50 +01:00 committed by GitHub
parent 2ab9e9f7fd
commit d3ff48c63f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 114 additions and 77 deletions

View file

@ -576,6 +576,12 @@ HOOKS
*). See functions like Route which asks redbean to do its default
thing from the handler.
OnError(status:int, message:string)
If this function is defined and if any errors occurs in
OnHttpRequest() then this method will be called instead of displaying
the default error page. Useful if you need to display the error page
using your specific code or send it to any tier service.
OnClientConnection(ip:int, port:int, serverip:int, serverport:int) → bool
If this function is defined it'll be called from the main process
each time redbean accepts a new client connection. If it returns