miette icon indicating copy to clipboard operation
miette copied to clipboard

Fancy extension for std::error::Error with pretty, detailed diagnostic printing.

Results 105 miette issues
Sort by recently updated
recently updated
newest added

The `Diagnostic` derive fails in the following: ``` use miette::{Diagnostic, SourceCode, SourceSpan}; use thiserror::Error; #[derive(Debug, Clone)] pub struct MySpan { span: SourceSpan, src: String, } impl From for SourceSpan {...

bug
help wanted

This allows creating error type with more than one field that contain `#[related]` errors. Why? Because they have different types and I don't want to mix them.

This PR builds on PR #367! Merging this should be equivalent to merging both! You can now pass a `&dyn Diagnostic` (as before), or a `Report` (or `&Report`, `&mut Report`,...

breaking

Failing some context tests, I'm pretty sure because `self.wrap_err(msg)` creates a `context_chain_downcast` table, whilst the `Report::from_msg(msg, self)` that it's impl clashed with only creates at `context_downcast`. I messed around and...

Fixes #369 The culprit was: https://github.com/zkat/miette/blob/ea4296dacec3b0e4762281d9d115c1bd69ecfac3/src/eyreish/error.rs#L728 In conjunction with: https://github.com/zkat/miette/blob/ea4296dacec3b0e4762281d9d115c1bd69ecfac3/src/eyreish/error.rs#L531-L537 Which converts a `Box` into the `Box`, hence the resultant object ends up with the empty `Diagnostic` impl defined above!...

I suspect this is a super subtle issue in the crazy vtable code, but here is a relatively compact reproduction of the issue: ```rust use miette::{miette, Diagnostic, LabeledSpan, Severity}; fn...

I've maybe not done enough thinking on this yet, but it would seem that https://docs.rs/miette/latest/miette/struct.Error.html can be converted to all sorts of `Error` or `Diagnostic` trait objects, but doesn't implement...

question

Partially addresses #366 Brings things in line with best practices as described in "Rust for Rustaceans" when it comes to "Ergonomic Trait Implementations" in Chapter 3. Practically means that people...

breaking

# Feature Request Introduction In the realm of software development, the clarity and usability of error messages are paramount. As developers, we often encounter diagnostic messages that are meant to...

enhancement