Y
Hacker News
new
|
ask
|
show
|
jobs
by
enneff
3719 days ago
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.
1 comments
pcwalton
3719 days ago
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.
link