Linked by fran on Fri 22nd Jul 2011 21:02 UTC
Permalink for comment 482176
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
Features
Linked by Thom Holwerda on 05/21/13 21:38 UTC
Linked by Thom Holwerda on 05/20/13 11:29 UTC
Linked by Thom Holwerda on 05/18/13 21:33 UTC
Linked by David Adams on 05/16/13 4:23 UTC
Linked by Thom Holwerda on 05/11/13 21:41 UTC
Linked by Thom Holwerda on 05/08/13 14:22 UTC
Linked by Thom Holwerda on 05/02/13 15:28 UTC
Linked by Thom Holwerda on 04/29/13 21:06 UTC
Linked by Thom Holwerda on 04/24/13 22:24 UTC
Linked by Thom Holwerda on 04/18/13 11:21 UTC
More Features »
Sponsored Links



Member since:
2005-08-17
This was probably your problem. Panic/Recover aren't used for error handling. They are used for handling exceptional situations that the programmer wasn't expecting and thus the program can't handle(usually programmer error). It's intentionally annoying to use to discourage people over using it.
Idiomatic error handling in Go is done using the multiple return statements and checking for returned error values. There are a few tutorials on the website and the language spec is easy to read. The standard library documentation is pretty good(far better than the vagueness of php's docs), but some examples might help new devs.