Articles tagged #errors

Page 1
Thumbnail for Improving error handling - panics vs. proper errors

Improving error handling - panics vs. proper errors

Nov 21, 2019
21 min #rust · #errors

Before we move on to parsing more of our raw packets, I want to take some time to improve our error handling strategy.

Currently, the ersatz codebase contains a mix of Result<T, E>, and some methods that panic, like unwrap() and expect().

We also have a custom Error enum that lets us return rawsock errors, IO errors, or Win32 errors:

pub enum rawsock stdio
Read more
Page 1

Go back to the homepage.

Discord GitHub Sponsors Patreon
Bluesky Mastodon PeerTube YouTube
TikTok Instagram RSS
About Legal Notice Privacy Policy Terms and Conditions