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

#123 in Rust patterns

Download history 100708/week @ 2024-09-21 112916/week @ 2024-09-28 102691/week @ 2024-10-05 104762/week @ 2024-10-12 107262/week @ 2024-10-19 105111/week @ 2024-10-26 113448/week @ 2024-11-02 110397/week @ 2024-11-09 108572/week @ 2024-11-16 89324/week @ 2024-11-23 110621/week @ 2024-11-30 107203/week @ 2024-12-07 113198/week @ 2024-12-14 56996/week @ 2024-12-21 82420/week @ 2024-12-28 95555/week @ 2025-01-04

363,247 downloads per month
Used in 1,382 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