tag

Macro tag 

Source
macro_rules! tag {
    ($tag:expr) => { ... };
}
👎Deprecated since 0.5.0: Use group! instead
Expand description

Creates a categorical tag for error classification.

This macro creates an ErrorContext::tag that can be used to categorize and filter errors by domain (e.g., “db”, “auth”, “network”).

§Deprecated

Use group! instead since version 0.5.0.

§Arguments

  • $tag - A string or expression that can be converted into a tag

§Examples

use error_rail::{tag, ComposableError};

let err = ComposableError::<&str>::new("connection failed")
    .with_context(tag!("network"));