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

#122 in Rust patterns

Download history 103712/week @ 2024-07-25 91627/week @ 2024-08-01 93765/week @ 2024-08-08 89645/week @ 2024-08-15 96172/week @ 2024-08-22 90458/week @ 2024-08-29 100695/week @ 2024-09-05 90097/week @ 2024-09-12 89649/week @ 2024-09-19 118995/week @ 2024-09-26 99416/week @ 2024-10-03 99163/week @ 2024-10-10 110903/week @ 2024-10-17 108770/week @ 2024-10-24 108831/week @ 2024-10-31 108299/week @ 2024-11-07

457,803 downloads per month
Used in 1,291 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