

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: The Error Interface
incomplete
2: Formatting Strings Review
incomplete
3: The Error Interface
incomplete
4: Errors Quiz
incomplete
5: The Errors Package
incomplete
6: Panic
incomplete
7: User Input
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Click to play video
Go programs express errors with error values. Error-values are any type that implements the simple built-in error interface.
Keep in mind that the way Go handles errors is fairly unique. Most languages treat errors as something special and different. For example, Python raises exception types and JavaScript throws and catches errors. In Go, an error is just another value that we handle like any other value - however we want! There aren't any special keywords for dealing with them.