Yah, that's true, I completely forgot about that. :/ I guess you could do what some others have done which is implement a Call function or a framework that runs all function calls in a middleware-esk style. And middleware has a recovery. So every call will have a recovery.
On Tuesday 26 December 2023 at 10:15:12 UTC+1 Jan Mercl wrote: > On Tue, Dec 26, 2023 at 9:12 AM Gergely Brautigam <skarl...@gmail.com> > wrote: > > > If you have a top level recover in you main, it doesn't matter where the > panic happens, you'll capture it. Even in third party library. > > Iff the panic occurs in the same goroutine where the defer is. Every > go statement starts a new goroutine that is not affected by defer > statement(s) in other goroutines. > -- 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/754f1577-8578-454e-97ac-eb6a91b79986n%40googlegroups.com.