Skip to content

Commit

Permalink
Re-export error types. (#104)
Browse files Browse the repository at this point in the history
* Re-export error types.

* Fmt

* Fix linter.

* Revert linter.
  • Loading branch information
tomusdrw committed Jun 27, 2023
1 parent b99d1c2 commit 63f94db
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ homepage = "https://github.com/tomusdrw/ethsign"
license = "GPL-3.0"
name = "ethsign"
repository = "https://github.com/tomusdrw/ethsign"
version = "0.9.0"
version = "0.10.0"

[dependencies]
zeroize = "1.0.0"
Expand Down
11 changes: 8 additions & 3 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

use crate::ec;

pub use crate::{
crypto::{error::ScryptError, Error as EthsignCryptoError},
ec::Error as Secp256k1Error,
};

/// Key error
#[derive(Debug)]
pub enum Error {
/// Invalid password for the keyfile
InvalidPassword,
/// Crypto error
Crypto(crate::crypto::Error),
Crypto(EthsignCryptoError),
/// Scrypt error
ScryptError(crate::crypto::error::ScryptError),
ScryptError(ScryptError),
/// Secp256k1 error
Secp256k1(crate::ec::Error),
Secp256k1(Secp256k1Error),
}

impl std::fmt::Display for Error {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
#![warn(missing_docs)]

mod ec;
mod error;
mod key;
mod protected;

use ethsign_crypto as crypto;

pub mod error;
pub mod keyfile;

pub use self::{
Expand Down

0 comments on commit 63f94db

Please sign in to comment.