[go-nuts] Re: Practical use cases of recover in golang

2022-10-10 Thread Vladimir Varankin
One particular example is if you use std's net/http server, you (indirectly) use recover. The std's documentation for the Handler interface has a section, where they outline how the server recovers from a panic, that fired in the context of a request https://pkg.go.dev/net/http#Handler On Sunda

[go-nuts] Re: Practical use cases of recover in golang

2022-10-09 Thread Eswaran S.K.
Production Code is typically written with multiple layers of abstraction. Typical patterns involve generic ones like Proxy / Command patterns. In these types of pattern, execution context is provided by the Client/Invoker. But, the implementation for execution is done by the different abstraction