Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: