1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use cosmwasm_std::StdError;
use mars_owner::OwnerError;
pub use mars_utils::error::ValidationError;
use thiserror::Error;

pub type ContractResult<T> = Result<T, ContractError>;

#[derive(Error, Debug, PartialEq)]
pub enum ContractError {
    #[error("{0}")]
    Std(#[from] StdError),

    #[error("{0}")]
    Owner(#[from] OwnerError),

    #[error("{0}")]
    Validation(#[from] ValidationError),
}