Hacker News new | past | comments | ask | show | jobs | submit login

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:

    func main() {
        try(func() {
            throw("Oops")
        }).catch(func(e any) {
            fmt.Println("Caught:", e)
        })
    }
https://go.dev/play/p/Y1-w9xUXIcO



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: