https://github.com/doumanash/error-code
Alternative Error for Rust
https://github.com/doumanash/error-code
Last synced: 3 months ago
JSON representation
Alternative Error for Rust
- Host: GitHub
- URL: https://github.com/doumanash/error-code
- Owner: DoumanAsh
- License: bsl-1.0
- Created: 2020-01-11T16:00:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-10T00:07:06.000Z (9 months ago)
- Last Synced: 2025-03-17T09:45:54.846Z (3 months ago)
- Language: Rust
- Size: 66.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# error-code
[](https://crates.io/crates/error-code)
[](https://docs.rs/crate/error-code/)
[](https://github.com/DoumanAsh/error-code/actions?query=workflow%3ARust)Error code library provides generic errno/winapi error wrapper
User can define own `Category` if you want to create new error wrapper.
## Usage
```rust
use error_code::ErrorCode;use std::fs::File;
File::open("non_existing");
println!("{}", ErrorCode::last_system());
```