Error handling
Option, Result and the ? operator: errors visible in the types, no exceptions.
- 1panic! and unrecoverable errorsWhen to stop the program, and why unwrap is a confession.
- 2The Result typeOk or Err: an error that is part of the signature.
- 3The ? operatorPropagate an error in a single character.
- 4Typed errorsAn enum of business errors, printable and usable.
- ◆Project: load a portfolioRunning projectRead a CSV of trades with typed, line-numbered errors, without a single panic.