Skip to content

Commit

Permalink
add thiserror for cairo error
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Oct 8, 2023
1 parent 60b79ce commit ca6d5f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions starknet-contract/src/abi/cairo_types/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ use starknet_core::types::FieldElement;
pub type Result<T> = core::result::Result<T, Error>;

/// A cairo type error.
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum Error {
/// Invalid type string.
#[error("Invalid type found {0:?}.")]
InvalidTypeString(String),
/// Error during serialization.
#[error("Error during serialization {0:?}.")]
Serialize(String),
/// Error during deserialization.
#[error("Error during deserialization {0:?}.")]
Deserialize(String),
}

Expand Down

0 comments on commit ca6d5f0

Please sign in to comment.