nydus-error
The nydus-error crate is a collection of helper utilities to handle error codes for Nydus Image Service project, which provides:
macro define_error_macro!()to optionally augment Posix errno with backtrace information.macro einval!(), enoent!()etc for commonly used error codes.struct ErrorHolderto provide a circular buffer to hold the latest error messages.
Support
Platforms:
- x86_64
- aarch64
Operating Systems:
- Linux
Usage
Add nydus-error as a dependency in Cargo.toml
[]
= "*"
Then add extern crate nydus-error; to your crate root if needed.
Examples
- Return an error with backtracing information:
- Put an error message into an
ErrorHolderobject.
License
This code is licensed under Apache-2.0 or BSD-3-Clause.