[go-nuts] Re: Getting panic: proto: extension number 1042 is already registered on message google.protobuf.FileOptions

2023-12-26 Thread Kevin Chowski
Please provide some more information about what you are trying to do, and how to reproduce your problem from scratch. Otherwise it will be hard to provide you any help at all. For example, what code are you using? What commands are you running? What goal are you trying to accomplish in the

Re: [go-nuts] Re: A global panic handler for crash reporting

2023-12-26 Thread Gergely Brautigam
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

Re: [go-nuts] Re: A global panic handler for crash reporting

2023-12-26 Thread Jan Mercl
On Tue, Dec 26, 2023 at 9:12 AM Gergely Brautigam 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

[go-nuts] Re: A global panic handler for crash reporting

2023-12-26 Thread Gergely Brautigam
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. package main import ( "fmt" "github.com/Skarlso/panic" ) func main() { defer func() { if r := recover(); r != nil { fmt.Println("Recovered in f", r) } }()