1use thiserror::Error;
4
5#[derive(Clone, Error, Debug)]
7pub enum Error {
8 #[error("Failed to build storage: {0}")]
10 StorageBuilding(String),
11 #[error("Loading the contract bundle has failed: {0}")]
13 BundleLoadFailed(String),
14}
15
16#[non_exhaustive]
21#[repr(u32)]
22#[derive(
23 Debug,
24 Copy,
25 Clone,
26 PartialEq,
27 Eq,
28 parity_scale_codec::Encode,
29 parity_scale_codec::Decode,
30 scale_info::TypeInfo,
31 Error,
32)]
33pub enum LangError {
34 #[error("Failed to read execution input for the dispatchable.")]
36 CouldNotReadInput = 1u32,
37}
38
39pub type MessageResult<T> = Result<T, LangError>;