Skip to content

error-stack support for multiple related errors #727

Description

@indietyp

I have been checking out error-stack lately, and it seems very promising, great work! For my specific usecase I would want report multiple errors at once, while not natively supported by the std::error::Error trait, crates like miette have the concept of related errors.

From my investigation into the library error-stack doesn't currently support this feature, is this correct? Are there any plans for supporting such a thing in the future? or would you be open for a PR implementing something like this? I think something like this would be a great addition to the library!

What I'd love to have is a DAG like the diagram below:

flowchart BT
  err1{{std::io::Error}}
  err2{{std::io::Error}}
  err3{{crate1::Error}}

  ctx1[crate2::Context]
  ctx2[crate3::Context]
  ctx3[crate4::Context]
  ctx4[crate2::Context2]
  ctx5[crate3::Context2]
 
  err1 --> ctx1
  ctx1 --> ctx2
  err2 --> ctx2
  ctx2 --> ctx3
  err3 --> ctx4
  ctx4 --> ctx5
  ctx5 --> ctx3
Loading

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions