4 ms·
> If even one of those goroutines does not have a defer set up, then an exception can crash the program. This might help. func GoCatch(f func ()) {
by houseabsolute 17y ago
> If even one of those goroutines does not have a defer set up, then an exception can crash the program.
This might help.
func GoCatch(f func ()) {
go func () {
defer func () {
e := recover()
if e != nil {
log.Stderr(e.String())
}
}()
f()
}
}
- btilly 17y agoYes, but my concern was, and remains, what happens with third party libraries. The fact that I can rewrite my stuff easily does not mean that I can rewrite that stuff as easily.
- houseabsolute 17y agoI guess I'm not really understanding the problem. What third-party library weakness do you think Go is especially susceptible to, exactly? An example would be nice.