Skip to content

refactor error handling to use thiserror#15

Open
ahdinosaur wants to merge 1 commit intomasterfrom
thiserror
Open

refactor error handling to use thiserror#15
ahdinosaur wants to merge 1 commit intomasterfrom
thiserror

Conversation

@ahdinosaur
Copy link
Copy Markdown
Member

did as part of ssb-archive

  • changed error enums from using failure to using thiserror.
    • this changes what the functions return, previously failure::Error, now they return an error enum, e.g. FlumeOffsetLogError.
  • added error variants for source errors that were previously handled automatically
    • i decided to make specific variants for each situation, rather than for example just having an Io(#[from] std::io::Error) variant.
  • changed the FlumeLog trait to take an associated type Error.

open to feedback on the best way to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant