use cosmwasm_std::StdError;
use thiserror::Error;
#[derive(Error, Debug, PartialEq)]
pub enum ContractError {
#[error("{0}")]
Std(#[from] StdError),
#[error("Unauthorized")]
Unauthorized {},
#[error("Cannot migrate from different contract type: {previous_contract}")]
CannotMigrate { previous_contract: String },
#[error("Cannot migrate from unsupported version: {previous_version}")]
CannotMigrateVersion { previous_version: String },
#[error("Got a submessage reply with unknown id: {id}")]
UnknownReplyId { id: u64 },
#[error("Semver parsing error: {0}")]
SemVer(String),
}
impl From<semver::Error> for ContractError {
fn from(err: semver::Error) -> Self {
Self::SemVer(err.to_string())
}
}
cw-cyber/contracts/cw-cyber-subgraph/src/error.rs
ฯ 0.0%
use StdError;
use Error;