Comment by LtWorf 14 days ago You understand go doesn't have exceptions right? 3 comments LtWorf Reply pjmlp 14 days ago You understand that I wrote C code, and in what concerns Go, panic/recover are exceptions that don't want to assume themselves as such? LtWorf 13 days ago You can't handle a panic, it's the whole point. 9rx 13 days ago In C, you mean?You clearly can in Go. How would you deal with exceptions otherwise? You can even get silly with it: func main() { try(func() { throw("Oops") }).catch(func(e any) { fmt.Println("Caught:", e) }) } https://go.dev/play/p/Y1-w9xUXIcO
pjmlp 14 days ago You understand that I wrote C code, and in what concerns Go, panic/recover are exceptions that don't want to assume themselves as such? LtWorf 13 days ago You can't handle a panic, it's the whole point. 9rx 13 days ago In C, you mean?You clearly can in Go. How would you deal with exceptions otherwise? You can even get silly with it: func main() { try(func() { throw("Oops") }).catch(func(e any) { fmt.Println("Caught:", e) }) } https://go.dev/play/p/Y1-w9xUXIcO
LtWorf 13 days ago You can't handle a panic, it's the whole point. 9rx 13 days ago In C, you mean?You clearly can in Go. How would you deal with exceptions otherwise? You can even get silly with it: func main() { try(func() { throw("Oops") }).catch(func(e any) { fmt.Println("Caught:", e) }) } https://go.dev/play/p/Y1-w9xUXIcO
9rx 13 days ago In C, you mean?You clearly can in Go. How would you deal with exceptions otherwise? You can even get silly with it: func main() { try(func() { throw("Oops") }).catch(func(e any) { fmt.Println("Caught:", e) }) } https://go.dev/play/p/Y1-w9xUXIcO
You understand that I wrote C code, and in what concerns Go, panic/recover are exceptions that don't want to assume themselves as such?
You can't handle a panic, it's the whole point.
In C, you mean?
You clearly can in Go. How would you deal with exceptions otherwise? You can even get silly with it:
https://go.dev/play/p/Y1-w9xUXIcO