Skip to main content

Module error_context

Module error_context 

Source
Expand description

Structured error context and error chaining utilities.

Provides ErrorContext, ErrorChain, and ErrorContextBuilder for attaching structured metadata (component, operation, and arbitrary key/value pairs) to errors propagated through the media pipeline.

§Examples

use oximedia_core::error_context::{ErrorContext, ErrorChain};

let ctx = ErrorContext::new("demuxer", "read_packet", "unexpected EOF");
assert_eq!(ctx.component(), "demuxer");

let chain = ErrorChain::root(ctx);
assert_eq!(chain.depth(), 1);

Structs§

ErrorChain
A chain of ErrorContext records representing an error’s call stack.
ErrorContext
Structured context attached to a single error occurrence.
ErrorContextBuilder
A builder that constructs an ErrorContext with a fluent API.