Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define an error type that captures all error variants shared between ibc-rs's errors #1249

Closed
Tracked by #270
seanchen1991 opened this issue Jun 4, 2024 · 1 comment
Labels
rust Pull requests that update Rust code S: errors Scope: related to error handlings

Comments

@seanchen1991
Copy link
Contributor

seanchen1991 commented Jun 4, 2024

This will serve to streamline and de-duplicate error variants shared amongst ibc-rs's different error types. @rnbguy suggestion is as follows:

pub enum GenericError<HostError> {
    HostError(HostError),
    DecodeError(..),
    EncodeError(..),
    ...
}

For example, any error related to decoding/encoding from any module would point to the GenericError::DecodeError variant. This should standardize error logging a bit, as well remove lots of extraneous variants that are copied between ibc-rs's different error types.

@seanchen1991 seanchen1991 changed the title Define a generic error type that captures all classes of errors shared between all the different error types Define an error type that captures all error variants shared between ibc-rs's errors Jun 4, 2024
@rnbguy rnbguy added S: errors Scope: related to error handlings rust Pull requests that update Rust code labels Jun 27, 2024
@seanchen1991
Copy link
Contributor Author

Closed in favor of #1319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code S: errors Scope: related to error handlings
Projects
Status: Done
Development

No branches or pull requests

2 participants