etrace 1.1.1

This library provides some structs and macros to create stackable/traceable errors for your own custom errors
Documentation
  • Coverage
  • 59.26%
    16 out of 27 items documented1 out of 8 items with examples
  • Size
  • Source code size: 13.93 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.14 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • KizzyCode/etrace
    1 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • KizzyCode

License License

About

This library provides some structs and macros to create stackable/traceable errors for your own custom error-kinds.

The main goal of this library is to provide a flexible way to create and handle error-traces without relying on a huge codebase. Since error handling is used everywhere in a project, it's usually pretty hard to change it afterwards. This library wants to adress this problem by being as simple as possible so that if you want to switch away you don't have a fuckload of dependent code that you'd need replace.

Features

We provide some macros to create and "throw/rethrow" an error with a custom kind T and optionally a custom description and/or a previous Error<T> (even for different types of T).

Additionally we provide macros to evaluate an expression (try_err!, try_err_from!, ok_or!, some_or!, ...) to either convert the resulting error into your Error<T> or to include the resulting error as sub-error into a new Error<T>.

Build Library and Documentation

To build and open the documentation, go into the projects root-directory and run cargo doc --open.

To build the library, go into the projects root-directory and run cargo build --release; you can find the build in target/release.