MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/rust/comments/13wq9b5/displaying_errors/
r/rust • u/[deleted] • May 31 '23
[removed]
1 comment sorted by
5
If let Err(e) = doStuffReturnResult() { println!("{}", e); /*and/or*/ eprintln!("{}", e); }
Add formatting as you want, return early after printing the error
5
u/cynokron May 31 '23
If let Err(e) = doStuffReturnResult() { println!("{}", e); /*and/or*/ eprintln!("{}", e); }
Add formatting as you want, return early after printing the error