abstract_ibc_host/
error.rs1use abstract_std::{
2 objects::{ans_host::AnsHostError, registry::RegistryError},
3 AbstractError,
4};
5use cosmwasm_std::{Instantiate2AddressError, StdError};
6use cw_ownable::OwnershipError;
7use thiserror::Error;
8
9#[derive(Error, Debug, PartialEq)]
10pub enum HostError {
11 #[error(transparent)]
12 Std(#[from] StdError),
13
14 #[error(transparent)]
15 Abstract(#[from] AbstractError),
16
17 #[error(transparent)]
18 OwnershipError(#[from] OwnershipError),
19
20 #[error(transparent)]
21 RegistryError(#[from] RegistryError),
22
23 #[error(transparent)]
24 AnsHostError(#[from] AnsHostError),
25
26 #[error(transparent)]
27 Instantiate2AddressError(#[from] Instantiate2AddressError),
28
29 #[error("Semver parsing error: {0}")]
30 SemVer(String),
31
32 #[error("Chain or account address already registered.")]
33 ProxyAddressExists {},
34
35 #[error("Can't send a module-to-module packet to {0}, wrong module type")]
36 WrongModuleAction(String),
37}
38
39impl From<semver::Error> for HostError {
40 fn from(err: semver::Error) -> Self {
41 Self::SemVer(err.to_string())
42 }
43}