Crates.io | vg_errortools |
lib.rs | vg_errortools |
version | 0.1.0 |
source | src |
created_at | 2022-10-20 08:22:51.260299 |
updated_at | 2022-10-20 08:22:51.260299 |
description | Helpers for better error legibility in std/tokio io errors and error handling in main functions. |
homepage | https://github.com/VolumeGraphics/vg_errortools |
repository | https://github.com/VolumeGraphics/vg_errortools |
max_upload_size | |
id | 692226 |
size | 8,472 |
This crate comprises mainly helpers for generating fat io errors - errors which carry the path of the file it failed with them.
It solves the problem with not knowing which file was being processed in async/await powered logged utilities.
Be aware, that the fat errors are cloning a PathBuf
to store the affected file.
For more comfort in main functions a MainError
is provided with a blanket implementation to allow using all errors with the ?
Operator.
It's no rocket-science, but convenient.