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 93574/week @ 2024-08-21 92431/week @ 2024-08-28 101082/week @ 2024-09-04 88061/week @ 2024-09-11 88722/week @ 2024-09-18 112096/week @ 2024-09-25 105830/week @ 2024-10-02 97971/week @ 2024-10-09 109904/week @ 2024-10-16 110210/week @ 2024-10-23 107274/week @ 2024-10-30 109108/week @ 2024-11-06 114185/week @ 2024-11-13 100736/week @ 2024-11-20 98067/week @ 2024-11-27 88142/week @ 2024-12-04

421,166 downloads per month
Used in 1,327 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