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 object. Also, in such cases typically there are multiple implementation objects that gets executed based on configuration/scenarios that are only decided at runtime. Based on organizational structure and how work gets divided it might be built by different teams within or spanning multiple organizations. In such chases, to gracefully handle and implement the functionality of the Client/Invoker, recovering from panic's is important. I have personally used recover() to gracefully handle scenarios that arose from third party libraries. On Monday, October 10, 2022 at 2:46:52 AM UTC+5:30 cg-guy wrote: > Hi Team, > > Whatever I have been worked so far with golang,I did not use recover() > function . > Curious to know if anyone using recover in production code and can you > please > the scenarios where it is used. > > Thanks > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/68757f01-1871-4dee-9245-84a7b44cb5c3n%40googlegroups.com.