[HN Gopher] Rust: Structuring and handling errors in 2020 (2020)
___________________________________________________________________
Rust: Structuring and handling errors in 2020 (2020)
Author : arm
Score : 52 points
Date : 2021-01-16 20:44 UTC (2 hours ago)
(HTM) web link (nick.groenen.me)
(TXT) w3m dump (nick.groenen.me)
| ibraheemdev wrote:
| So we're marking posts as [2020] already?
| overboard2 wrote:
| It is May of 2020, which makes it a bit better.
| Redoubts wrote:
| 2020 (2020) [0]
|
| 0. https://en.wikipedia.org/wiki/2020
| muskox2 wrote:
| I use a similar method for error handing, using the derive_more
| crate to avoid the boilerplate. I really wish that the error
| messages for standard library operations, like opening a file,
| were more descriptive. It's a pain to have to wrap the error with
| the filename ever time you do an IO operation.
| aldanor wrote:
| Another crate to mention - eyre and color-eyre, basically a port
| of anyhow but a few bells and whistles, and an awesome colored
| error report formatter.
|
| https://github.com/yaahc/color-eyre
___________________________________________________________________
(page generated 2021-01-16 23:00 UTC)