creating your own errors in rust may be easier than you think

Subscribers:
8,090
Published on ● Video Link: https://www.youtube.com/watch?v=f9hEjMUuNjw



Duration: 10:59
226 views
16


It absolutely is possible to create our own errors by impleminting the Error trait in #rust by hand. While Thiserror can make things a bit easier it isn't necessary. In this video I'll show you how you can make your errors and at the least understand a bit more how errors work in Rust code.

Links

Error trait: https://doc.rust-lang.org/std/error/trait.Error.html

thiserror crate: https://crates.io/crates/thiserror




Other Videos By Brooks Builds (brookzerker)


2023-09-25Stream archive: Finishing rough draft of Redis in Axum + Rust article (2023-09-25)
2023-09-24Stream archive: Connecting to Redis in Axum + Rust (2023-09-22)
2023-09-23Stream archive: Connecting to Redis from Axum (2023-09-21)
2023-09-22Stream archive: Axum state, recording a video, and starting a lesson on connecting to Redis and Post
2023-09-21Stream archive: Handling errors in Axum and state management (2023-09-15)
2023-09-20Stream archive: Writing article for handling Axum Errors (2023-09-14)
2023-09-19Stream archive: finishing Axum status codes and starting on error handling (2023-09-13)
2023-09-18Stream archive: response codes with axum (2023-09-2023)
2023-09-17Stream archive: Finishing Query Params article, recording query params, recording errors "short" (20
2023-09-14Stream archive: Recorded Path variables and started writing query params axum lesson (2023-09-08)
2023-09-14creating your own errors in rust may be easier than you think
2023-09-13Stream archive: Finished writing Axum Path segment capture article, explored Tracing, and failed rec
2023-09-12Stream archive: Writing Path Variable lesson for Axum + Rust (2023-09-06)
2023-09-11Stream archive: Creating an Axum + Rust course: Responding with JSON (2023-09-05)
2023-09-10Stream archive: mostly debugging Alacritty, Helix, and Zellij (2023-09-04)
2023-09-07Stream archive: Creating an Axum + Rust course - responding with JSON (2023-09-01)
2023-09-07Stream archive: Creating an Axum + Rust course - Hello World (2023-08-31)
2023-09-06Stream archive: Writing articles for an Axum + Rust course (short stream today) (2023-08-30)
2023-09-05Stream archive: Writing articles for an Axum + Rust course (2023-08-28)
2023-09-04Rust 1.72.0 new feature: String leak!
2023-09-01Stream archive: Writing articles for an Axum + Rust course (2023-08-25)



Tags:
Alacritty
Error trait rust
Helix
Programming
Rust
Rust errors
Zellij
alacritty terminal
coding
rust
rust programming language
rust programming tutorial