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

As you probably already know, panic/recover/defer are not supposed to be used in the same way as try/catch/finally. They're different features for different purposes.

If you want error handling in Go, use error values.



Sure. Panic, recover, and defer are in the language, though, and are more complex than exceptions regardless of how they're intended to be used.




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

Search: