Skip to main content

Crate ohno_macros_impl

Crate ohno_macros_impl 

Source
Expand description

Implementation of the procedural macros for the ohno crate.

This crate holds the logic behind:

  • #[derive(Error)] - Automatically implement error traits
  • #[enrich_err("message")] - Add error enrichment with file/line information to function errors
  • #[ohno::error] - Turn a plain struct into an error type

Do not depend on this crate directly. Use the re-exports from ohno instead.

Functionsยง

derive_error
Expands the #[derive(Error)] derive macro.
enrich_err
Expands the #[enrich_err(...)] attribute macro.
error
Expands the #[ohno::error] attribute macro.