mirror of https://github.com/zkat/miette.git
Add Diagnostic::caused_by()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
d6afb5061d
commit
29aead4a94
|
|
@ -59,6 +59,11 @@ pub trait Diagnostic: std::error::Error {
|
|||
fn related<'a>(&'a self) -> Option<Box<dyn Iterator<Item = &'a dyn Diagnostic> + 'a>> {
|
||||
None
|
||||
}
|
||||
|
||||
/// The cause of the error.
|
||||
fn caused_by(&self) -> Option<&dyn Diagnostic> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for Box<dyn Diagnostic> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue