Error Handling in Rust - Andrew Gallant's Blog
burntsushi.net · 14,604 words · saved by 1 readers
I blog mostly about my own programming projects.
Like most programming languages, Rust encourages the programmer to handle errors in a particular way. Generally speaking, error handling is divided into two broad categories: exceptions and return values. Rust opts for return values. In this article, I intend to provide a comprehensive treatment of how to deal with errors in Rust. More than that, I will attempt to introduce error handling one piece at a time so that you'll come away with a solid working knowledge of how everything fits together. When done naively, error handling in Rust can be verbose and annoying. This article will explore th
related reading
- Recoverable Errors with Result - The Rust Programming Languagedoc.rust-lang.org
- 100 Exercises To Learn Rustrust-exercises.com
- Modular Errors in Rust - Sabrina Jewsonsabrinajewson.org
- A half-hour to learn Rustfasterthanli.me
- Rust Solves The Issues With Exceptions · Dmitrii Aleksandrovhome.expurple.me
- Defining an Enum - The Rust Programming Languagedoc.rust-lang.org
- Programming a Guessing Game - The Rust Programming Languagedoc.rust-lang.org
- Rust Language Cheat Sheetcheats.rs
- Rewriting Bun in Rust | Bun Blogbun.com
- Patterns for Defensive Programming in Rust | corrode Rust Consultingcorrode.dev
- Working with strings in Rustfasterthanli.me
- Enums and Pattern Matching - The Rust Programming Languagedoc.rust-lang.org