21 releases (12 stable)

3.3.1 Sep 10, 2024
3.2.0 Feb 27, 2024
3.0.0 Sep 30, 2023
2.3.1 Jan 21, 2022
0.1.2 Jan 23, 2020

#125 in Rust patterns

Download history 103090/week @ 2024-10-06 104696/week @ 2024-10-13 107772/week @ 2024-10-20 106186/week @ 2024-10-27 112121/week @ 2024-11-03 111066/week @ 2024-11-10 108529/week @ 2024-11-17 89708/week @ 2024-11-24 110280/week @ 2024-12-01 107933/week @ 2024-12-08 111482/week @ 2024-12-15 58023/week @ 2024-12-22 82467/week @ 2024-12-29 118460/week @ 2025-01-05 135888/week @ 2025-01-12 120467/week @ 2025-01-19

464,984 downloads per month
Used in 1,403 crates (6 directly)

BSL-1.0 license

26KB
516 lines

error-code

Crates.io Documentation Build

Error code library provides generic errno/winapi error wrapper

User can define own Category if you want to create new error wrapper.

Usage

use error_code::ErrorCode;

use std::fs::File;

File::open("non_existing");
println!("{}", ErrorCode::last_system());

lib.rs:

Error code library provides generic errno/winapi error wrapper

User can define own Category if you want to create new error wrapper.

Usage

use error_code::ErrorCode;

use std::fs::File;

File::open("non_existing");
println!("{}", ErrorCode::last_system());

No runtime deps

Features