20 releases (11 stable)

3.2.0 Feb 27, 2024
3.0.0 Sep 30, 2023
2.3.1 Jan 21, 2022
2.3.0 May 19, 2021
0.1.2 Jan 23, 2020

#128 in Rust patterns

Download history 104515/week @ 2024-05-12 99213/week @ 2024-05-19 99857/week @ 2024-05-26 103000/week @ 2024-06-02 89957/week @ 2024-06-09 91129/week @ 2024-06-16 97959/week @ 2024-06-23 91182/week @ 2024-06-30 96705/week @ 2024-07-07 103347/week @ 2024-07-14 106862/week @ 2024-07-21 99080/week @ 2024-07-28 95486/week @ 2024-08-04 88171/week @ 2024-08-11 91229/week @ 2024-08-18 91081/week @ 2024-08-25

371,922 downloads per month
Used in 1,172 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