blob: e11be76057cf352197e367ce199f1f6eb7fbbe33 [file] [log] [blame] [view]
Russ Cox270a22d2023-12-05 11:15:03 -05001---
2title: LearnErrorHandling
3---
4
Sameer Ajmanicda56052015-01-09 13:49:30 -05005This page links to resources about error handling in Go.
6
7## Getting Started
8
Sean Liao3c9c9e12022-01-22 17:27:16 +01009- Read [Effective Go: Errors](https://go.dev/doc/effective_go#errors)
mbyd9163418e432017-09-29 17:17:41 +080010- Code [A Tour of Go: Errors](http://tour.golang.org/methods/19) and do the [exercise](http://tour.golang.org/methods/20)
Sean Liao3c9c9e12022-01-22 17:27:16 +010011- Study [The Go Programming Language Specification: Errors](https://go.dev/ref/spec#Errors)
12- Study [Package errors](https://pkg.go.dev/errors/)
13- Study [func fmt.Errorf](https://pkg.go.dev/fmt/#Errorf)
Sameer Ajmanicda56052015-01-09 13:49:30 -050014
15## Standard Practice
16
Sean Liao3c9c9e12022-01-22 17:27:16 +010017- Read [Why does Go not have exceptions?](https://go.dev/doc/faq#exceptions)
18- Read [Error handling and Go](https://go.dev/blog/error-handling-and-go)
Sameer Ajmanicda56052015-01-09 13:49:30 -050019- Read [Go by Example: Errors](https://gobyexample.com/errors)
Sean Liao3c9c9e12022-01-22 17:27:16 +010020- Read [Errors are values](https://go.dev/blog/errors-are-values)
21- Read [Working with Errors in Go 1.13](https://go.dev/blog/go1.13-errors)
Sameer Ajmania5dc76b2015-01-12 11:23:19 -050022- Read [golang/go/wiki: Errors](Errors)
Sameer Ajmanicda56052015-01-09 13:49:30 -050023
24## Advanced Topics
25
Sean Liao3c9c9e12022-01-22 17:27:16 +010026- Read [Why is my nil error value not equal to nil?](https://go.dev/doc/faq#nil_error)
Russ Cox270a22d2023-12-05 11:15:03 -050027- Read [Defer, Panic, and Recover](https://go.dev/blog/defer-panic-and-recover)