Are you mistaking Rust for some other language? Error handling in Rust is mostly just using the `?` operator.
The Rust book explains - https://doc.rust-lang.org/book/ch09-02-recoverable-errors-wi...