Skip to content

Commit

Permalink
Impl Error for GlifLoadError
Browse files Browse the repository at this point in the history
  • Loading branch information
madig committed Dec 15, 2021
1 parent 1bbbe89 commit 538903c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,16 @@ impl std::error::Error for GlifWriteError {
}
}

impl std::error::Error for GlifLoadError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
GlifLoadError::Io(e) => Some(e),
GlifLoadError::Xml(e) => Some(e),
GlifLoadError::Parse(_) => None,
}
}
}

impl std::error::Error for Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
Expand Down

0 comments on commit 538903c

Please sign in to comment.