Tristan-H11 / Kryptographie

https://krypto-gui.tristan-hoermann.de
2 stars 2 forks source link

Error Handling in Rust #94

Closed Tristan-H11 closed 8 months ago

Tristan-H11 commented 9 months ago

Es muss sich tief ins error handling in Rust eingelesen werden. Das gilt es dann anschließend umzusetzen. Jedes unwrap(), except(), etc muss nachgeprüft werden, jeder Rückgabetyp muss angeschaut werden, ob darauf vllt ein result gemacht werden muss etc.

Tristan-H11 commented 8 months ago

https://stackoverflow.com/questions/42584368/how-do-you-define-custom-error-types-in-rust

https://mmapped.blog/posts/12-rust-error-handling.html

https://lib.rs/crates/anyhow

Tristan-H11 commented 8 months ago

https://docs.rs/error-stack/latest/error_stack/ das nutzen. Mit change_context(), .report(), etc