Directories
¶
| Path | Synopsis |
|---|---|
|
Sample program to show how the default error type is implemented.
|
Sample program to show how the default error type is implemented. |
|
Sample program to show how to use error variables to help the caller determine the exact error being returned.
|
Sample program to show how to use error variables to help the caller determine the exact error being returned. |
|
http://golang.org/src/pkg/encoding/json/decode.go Sample program to show how to implement a custom error type based on the json package in the standard library.
|
http://golang.org/src/pkg/encoding/json/decode.go Sample program to show how to implement a custom error type based on the json package in the standard library. |
|
Package example4 provides code to show how to implement behavior as context.
|
Package example4 provides code to show how to implement behavior as context. |
|
Sample program to show see if the class can find the bug.
|
Sample program to show see if the class can find the bug. |
|
reason
command
Sample program to show see if the class can find the bug.
|
Sample program to show see if the class can find the bug. |
|
Sample program to show how wrapping errors work with pkg/errors.
|
Sample program to show how wrapping errors work with pkg/errors. |
|
Sample program to show how wrapping errors work with the stdlib.
|
Sample program to show how wrapping errors work with the stdlib. |
|
exercises
|
|
|
exercise1
command
Create two error variables, one called ErrInvalidValue and the other called ErrAmountTooLarge.
|
Create two error variables, one called ErrInvalidValue and the other called ErrAmountTooLarge. |
|
exercise2
command
Create a custom error type called appError that contains three fields, err error, message string and code int.
|
Create a custom error type called appError that contains three fields, err error, message string and code int. |
|
template1
command
Create two error variables, one called ErrInvalidValue and the other called ErrAmountTooLarge.
|
Create two error variables, one called ErrInvalidValue and the other called ErrAmountTooLarge. |
|
template2
command
Create a custom error type called appError that contains three fields, err error, message string and code int.
|
Create a custom error type called appError that contains three fields, err error, message string and code int. |
Click to show internal directories.
Click to hide internal directories.