From ca6d5f05e18ff7c24979c9b4518a6415b3f3820d Mon Sep 17 00:00:00 2001 From: glihm Date: Sat, 7 Oct 2023 22:45:48 -0600 Subject: [PATCH] add thiserror for cairo error --- starknet-contract/src/abi/cairo_types/error.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/starknet-contract/src/abi/cairo_types/error.rs b/starknet-contract/src/abi/cairo_types/error.rs index 7ab1bf8a..b43a0092 100644 --- a/starknet-contract/src/abi/cairo_types/error.rs +++ b/starknet-contract/src/abi/cairo_types/error.rs @@ -6,13 +6,13 @@ use starknet_core::types::FieldElement; pub type Result = core::result::Result; /// 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), }