Upgrade to thiserror 2.0 (#5414)

* Upgrade to thiserror 2.0

* Remove line macros in vesting contract error type

* Name positional arguments in GatewayRequestsError

* Named positional argument

* Revert "Remove line macros in vesting contract error type"

This reverts commit 49f937da3f.

* Use positional arguments for line
This commit is contained in:
Jon Häggblad
2025-02-03 10:50:11 +01:00
committed by GitHub
parent d6aacae14e
commit 68a192daa3
6 changed files with 123 additions and 123 deletions
Generated
+90 -90
View File
@@ -2454,7 +2454,7 @@ dependencies = [
"schemars",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
]
@@ -2466,7 +2466,7 @@ dependencies = [
"console_error_panic_hook",
"js-sys",
"serde-wasm-bindgen 0.6.5",
"thiserror 1.0.69",
"thiserror 2.0.11",
"wasm-bindgen",
"wasm-bindgen-futures",
"wasm-storage",
@@ -4407,7 +4407,7 @@ dependencies = [
"rand",
"serde",
"serde-wasm-bindgen 0.6.5",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tsify",
"url",
@@ -4808,7 +4808,7 @@ dependencies = [
"sha2 0.9.9",
"sqlx",
"tempfile",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-stream",
@@ -4849,7 +4849,7 @@ dependencies = [
"serde_json",
"sha2 0.10.8",
"tendermint 0.40.1",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"ts-rs",
"utoipa",
@@ -4901,7 +4901,7 @@ dependencies = [
"rand",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tokio-stream",
"tokio-util",
@@ -4924,7 +4924,7 @@ dependencies = [
"rand",
"serde",
"sha2 0.10.8",
"thiserror 1.0.69",
"thiserror 2.0.11",
"x25519-dalek",
]
@@ -4944,7 +4944,7 @@ dependencies = [
"nym-task",
"nym-validator-client",
"rand",
"thiserror 1.0.69",
"thiserror 2.0.11",
"url",
"zeroize",
]
@@ -4983,7 +4983,7 @@ dependencies = [
"nym-validator-client",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -5061,7 +5061,7 @@ dependencies = [
"serde_json",
"tap",
"tempfile",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"toml 0.8.19",
@@ -5098,7 +5098,7 @@ dependencies = [
"serde",
"serde_json",
"tap",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-tungstenite",
@@ -5155,7 +5155,7 @@ dependencies = [
"si-scale",
"tap",
"tempfile",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-stream",
@@ -5180,7 +5180,7 @@ dependencies = [
"nym-sphinx-addressing",
"nym-sphinx-params",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"url",
]
@@ -5195,7 +5195,7 @@ dependencies = [
"nym-gateway-requests",
"serde",
"sqlx",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"url",
@@ -5213,7 +5213,7 @@ dependencies = [
"nym-sphinx",
"nym-task",
"sqlx",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
]
@@ -5232,7 +5232,7 @@ dependencies = [
"serde",
"serde-wasm-bindgen 0.6.5",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tsify",
"wasm-bindgen",
"wasm-bindgen-futures",
@@ -5270,7 +5270,7 @@ dependencies = [
"serde",
"serde_derive",
"sha2 0.9.9",
"thiserror 1.0.69",
"thiserror 2.0.11",
"zeroize",
]
@@ -5317,7 +5317,7 @@ dependencies = [
"serde",
"sha2 0.9.9",
"subtle 2.5.0",
"thiserror 1.0.69",
"thiserror 2.0.11",
"zeroize",
]
@@ -5330,7 +5330,7 @@ dependencies = [
"log",
"nym-network-defaults",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"toml 0.8.19",
"url",
]
@@ -5346,7 +5346,7 @@ dependencies = [
"schemars",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"utoipa",
"vergen",
]
@@ -5407,7 +5407,7 @@ dependencies = [
"strum 0.26.3",
"strum_macros 0.26.4",
"tempfile",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-util",
@@ -5455,7 +5455,7 @@ dependencies = [
"nym-ecash-time",
"serde",
"sqlx",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"zeroize",
]
@@ -5473,7 +5473,7 @@ dependencies = [
"nym-credentials-interface",
"nym-ecash-time",
"nym-validator-client",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
]
@@ -5497,7 +5497,7 @@ dependencies = [
"nym-validator-client",
"rand",
"si-scale",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tracing",
@@ -5521,7 +5521,7 @@ dependencies = [
"nym-validator-client",
"rand",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"zeroize",
]
@@ -5537,7 +5537,7 @@ dependencies = [
"rand",
"serde",
"strum 0.26.3",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"utoipa",
]
@@ -5565,7 +5565,7 @@ dependencies = [
"serde",
"serde_bytes",
"subtle-encoding",
"thiserror 1.0.69",
"thiserror 2.0.11",
"x25519-dalek",
"zeroize",
]
@@ -5589,7 +5589,7 @@ dependencies = [
"serde",
"serde_derive",
"sha2 0.9.9",
"thiserror 1.0.69",
"thiserror 2.0.11",
"zeroize",
]
@@ -5604,7 +5604,7 @@ dependencies = [
"cw-utils",
"cw2",
"nym-multisig-contract-common",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -5639,7 +5639,7 @@ dependencies = [
"reqwest 0.12.4",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tracing",
"utoipa",
]
@@ -5663,7 +5663,7 @@ dependencies = [
"nym-explorer-api-requests",
"reqwest 0.12.4",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tracing",
"url",
@@ -5723,7 +5723,7 @@ dependencies = [
"rand",
"sha2 0.10.8",
"sqlx",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-stream",
@@ -5756,7 +5756,7 @@ dependencies = [
"rand",
"serde",
"si-scale",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-stream",
@@ -5789,7 +5789,7 @@ dependencies = [
"serde",
"serde_json",
"strum 0.26.3",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tracing",
"tungstenite 0.20.1",
@@ -5807,7 +5807,7 @@ dependencies = [
"nym-statistics-common",
"sqlx",
"strum 0.26.3",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tracing",
@@ -5823,7 +5823,7 @@ dependencies = [
"nym-gateway-requests",
"nym-sphinx",
"sqlx",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tracing",
@@ -5839,7 +5839,7 @@ dependencies = [
"nym-ffi-shared",
"nym-sdk",
"nym-sphinx-anonymous-replies",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"uniffi",
"uniffi_build",
@@ -5868,7 +5868,7 @@ dependencies = [
"reqwest 0.12.4",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tracing",
"url",
@@ -5900,7 +5900,7 @@ version = "0.1.0"
dependencies = [
"nym-credential-storage",
"nym-credentials",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tracing",
"zeroize",
@@ -5926,7 +5926,7 @@ version = "0.1.0"
dependencies = [
"log",
"rand",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -5940,7 +5940,7 @@ dependencies = [
"nym-sphinx",
"rand",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-util",
@@ -5980,7 +5980,7 @@ dependencies = [
"serde",
"serde_json",
"tap",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-tun",
@@ -5996,7 +5996,7 @@ dependencies = [
"k256",
"ledger-transport",
"ledger-transport-hid",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6041,7 +6041,7 @@ dependencies = [
"serde",
"serde-json-wasm",
"serde_repr",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"ts-rs",
"utoipa",
@@ -6067,7 +6067,7 @@ dependencies = [
"nym-task",
"rand",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-util",
@@ -6086,7 +6086,7 @@ dependencies = [
"cw4",
"schemars",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6179,7 +6179,7 @@ dependencies = [
"sqlx",
"tap",
"tempfile",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-tungstenite",
@@ -6243,7 +6243,7 @@ dependencies = [
"serde_json",
"si-scale",
"sysinfo",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-util",
@@ -6289,7 +6289,7 @@ dependencies = [
"serde",
"serde_json",
"strum 0.26.3",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"utoipa",
@@ -6343,7 +6343,7 @@ dependencies = [
"sqlx",
"strum 0.26.3",
"strum_macros 0.26.4",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-util",
@@ -6386,7 +6386,7 @@ dependencies = [
"rand_chacha",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"wasm-utils",
]
@@ -6401,7 +6401,7 @@ dependencies = [
"rand",
"serde",
"serde-wasm-bindgen 0.6.5",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tsify",
"wasm-bindgen",
@@ -6442,7 +6442,7 @@ name = "nym-ordered-buffer"
version = "0.1.0"
dependencies = [
"log",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6460,7 +6460,7 @@ dependencies = [
"rand",
"rayon",
"sphinx-packet",
"thiserror 1.0.69",
"thiserror 2.0.11",
"zeroize",
]
@@ -6514,7 +6514,7 @@ dependencies = [
"reqwest 0.12.4",
"serde",
"tap",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tokio-stream",
"tokio-util",
@@ -6557,7 +6557,7 @@ dependencies = [
"nym-sphinx-anonymous-replies",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
]
@@ -6587,7 +6587,7 @@ dependencies = [
"serde",
"serde_json",
"tap",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"url",
@@ -6621,7 +6621,7 @@ dependencies = [
"schemars",
"serde",
"tap",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"url",
]
@@ -6653,7 +6653,7 @@ dependencies = [
"serde",
"serde_json",
"tap",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6678,7 +6678,7 @@ dependencies = [
"rand",
"rand_chacha",
"rand_distr",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
]
@@ -6696,7 +6696,7 @@ dependencies = [
"nym-topology",
"rand",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"zeroize",
]
@@ -6708,7 +6708,7 @@ dependencies = [
"nym-sphinx-types",
"rand",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6725,7 +6725,7 @@ dependencies = [
"rand",
"rand_chacha",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"wasm-bindgen",
]
@@ -6742,7 +6742,7 @@ dependencies = [
"nym-sphinx-types",
"rand",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"utoipa",
]
@@ -6760,7 +6760,7 @@ dependencies = [
"nym-sphinx-types",
"nym-topology",
"rand",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6771,7 +6771,7 @@ dependencies = [
"nym-sphinx-addressing",
"nym-sphinx-params",
"nym-sphinx-types",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6786,7 +6786,7 @@ dependencies = [
"nym-sphinx-forwarding",
"nym-sphinx-params",
"nym-sphinx-types",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tokio-util",
]
@@ -6798,7 +6798,7 @@ dependencies = [
"nym-crypto",
"nym-sphinx-types",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6807,7 +6807,7 @@ version = "0.1.0"
dependencies = [
"nym-sphinx-addressing",
"nym-sphinx-types",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6816,7 +6816,7 @@ version = "0.2.0"
dependencies = [
"nym-outfox",
"sphinx-packet",
"thiserror 1.0.69",
"thiserror 2.0.11",
]
[[package]]
@@ -6835,7 +6835,7 @@ dependencies = [
"sha2 0.10.8",
"si-scale",
"sysinfo",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"wasmtimer",
@@ -6852,7 +6852,7 @@ dependencies = [
"rand",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"zeroize",
]
@@ -6863,7 +6863,7 @@ dependencies = [
"cfg-if",
"futures",
"log",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tokio-util",
"tracing",
@@ -6905,7 +6905,7 @@ dependencies = [
"reqwest 0.12.4",
"serde",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tracing",
"tsify",
"wasm-bindgen",
@@ -6919,7 +6919,7 @@ dependencies = [
"etherparse",
"log",
"nym-wireguard-types",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tokio-tun",
]
@@ -6947,7 +6947,7 @@ dependencies = [
"sha2 0.10.8",
"strum 0.26.3",
"tempfile",
"thiserror 1.0.69",
"thiserror 2.0.11",
"ts-rs",
"url",
"utoipa",
@@ -6994,7 +6994,7 @@ dependencies = [
"serde_json",
"sha2 0.9.9",
"tendermint-rpc",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tracing",
@@ -7038,7 +7038,7 @@ dependencies = [
"serde_with",
"sha2 0.10.8",
"sqlx",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tracing",
@@ -7057,7 +7057,7 @@ dependencies = [
"nym-task",
"nym-validator-client",
"rand",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-util",
@@ -7075,7 +7075,7 @@ dependencies = [
"nym-contracts-common",
"nym-mixnet-contract-common",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"ts-rs",
]
@@ -7096,7 +7096,7 @@ dependencies = [
"serde",
"serde-wasm-bindgen 0.6.5",
"serde_json",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tsify",
"wasm-bindgen",
@@ -7143,7 +7143,7 @@ dependencies = [
"nym-node-metrics",
"nym-task",
"nym-wireguard-types",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-stream",
@@ -7162,7 +7162,7 @@ dependencies = [
"nym-network-defaults",
"rand",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"x25519-dalek",
]
@@ -7189,7 +7189,7 @@ dependencies = [
"serde_json",
"sha2 0.10.8",
"tar",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tracing",
@@ -7218,7 +7218,7 @@ dependencies = [
"serde",
"serde_json",
"sqlx",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-util",
@@ -7245,7 +7245,7 @@ dependencies = [
"sqlx",
"tendermint 0.40.1",
"tendermint-rpc",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"tokio-stream",
@@ -10080,7 +10080,7 @@ dependencies = [
"serde_json",
"sqlx",
"tempfile",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tokio",
"toml 0.8.19",
@@ -11362,7 +11362,7 @@ dependencies = [
"rand",
"serde",
"serde-wasm-bindgen 0.6.5",
"thiserror 1.0.69",
"thiserror 2.0.11",
"time",
"tsify",
"url",
@@ -11384,7 +11384,7 @@ dependencies = [
"nym-store-cipher",
"serde",
"serde-wasm-bindgen 0.6.5",
"thiserror 1.0.69",
"thiserror 2.0.11",
"wasm-bindgen",
"wasm-utils",
]
@@ -12106,7 +12106,7 @@ dependencies = [
"rand",
"reqwest 0.12.4",
"serde",
"thiserror 1.0.69",
"thiserror 2.0.11",
"tokio",
"tsify",
"uuid",
+1 -1
View File
@@ -329,7 +329,7 @@ sysinfo = "0.33.0"
tap = "1.0.1"
tar = "0.4.43"
tempfile = "3.15"
thiserror = "1.0.64"
thiserror = "2.0"
time = "0.3.37"
tokio = "1.39"
tokio-stream = "0.1.17"
@@ -8,81 +8,81 @@ use thiserror::Error;
#[derive(Error, Debug, PartialEq)]
pub enum VestingContractError {
#[error("VESTING ({}): {0}", line!())]
#[error("VESTING ({l}): {0}", l = line!())]
Std(#[from] StdError),
#[error("VESTING: {0}")]
OverflowError(#[from] OverflowError),
#[error("VESTING ({}): Account does not exist - {0}", line!())]
#[error("VESTING ({l}): Account does not exist - {0}", l = line!())]
NoAccountForAddress(String),
#[error("VESTING ({}): Only admin can perform this action, {0} is not admin", line!())]
#[error("VESTING ({l}): Only admin can perform this action, {0} is not admin", l = line!())]
NotAdmin(String),
#[error("VESTING ({}): Balance not found for existing account ({0}), this is a bug", line!())]
#[error("VESTING ({l}): Balance not found for existing account ({0}), this is a bug", l = line!())]
NoBalanceForAddress(String),
#[error("VESTING ({}): Insufficient balance for address {0} -> {1}", line!())]
#[error("VESTING ({l}): Insufficient balance for address {0} -> {1}", l = line!())]
InsufficientBalance(String, u128),
#[error("VESTING ({}): Insufficient spendable balance for address {0} -> {1}", line!())]
#[error("VESTING ({l}): Insufficient spendable balance for address {0} -> {1}", l = line!())]
InsufficientSpendable(String, u128),
#[error(
"VESTING ({}):Only delegation owner can perform delegation actions, {0} is not the delegation owner"
, line!())]
"VESTING ({l}):Only delegation owner can perform delegation actions, {0} is not the delegation owner"
, l = line!())]
NotDelegate(String),
#[error("VESTING ({}): Total vesting amount is inprobably low -> {0}, this is likely an error", line!())]
#[error("VESTING ({l}): Total vesting amount is inprobably low -> {0}, this is likely an error", l = line!())]
ImprobableVestingAmount(u128),
#[error("VESTING ({}): Address {0} has already bonded a node", line!())]
#[error("VESTING ({l}): Address {0} has already bonded a node", l = line!())]
AlreadyBonded(String),
#[error("VESTING ({}): Received empty funds vector", line!())]
#[error("VESTING ({l}): Received empty funds vector", l = line!())]
EmptyFunds,
#[error("VESTING ({}): Received wrong denom: {0}, expected {1}", line!())]
#[error("VESTING ({l}): Received wrong denom: {0}, expected {1}", l = line!())]
WrongDenom(String, String),
#[error("VESTING ({}): Received multiple denoms, expected 1", line!())]
#[error("VESTING ({l}): Received multiple denoms, expected 1", l = line!())]
MultipleDenoms,
#[error("VESTING ({}): No delegations found for account {0}, mix_identity {1}", line!())]
#[error("VESTING ({l}): No delegations found for account {0}, mix_identity {1}", l = line!())]
NoSuchDelegation(Addr, NodeId),
#[error("VESTING ({}): Only mixnet contract can perform this operation, got {0}", line!())]
#[error("VESTING ({l}): Only mixnet contract can perform this operation, got {0}", l = line!())]
NotMixnetContract(Addr),
#[error("VESTING ({}): Calculation underflowed", line!())]
#[error("VESTING ({l}): Calculation underflowed", l = line!())]
Underflow,
#[error("VESTING ({}): No bond found for account {0}", line!())]
#[error("VESTING ({l}): No bond found for account {0}", l = line!())]
NoBondFound(String),
#[error("VESTING: Attempted to reduce mixnode bond pledge below zero! The current pledge is {current} and we attempted to reduce it by {decrease_by}.")]
InvalidBondPledgeReduction { current: Coin, decrease_by: Coin },
#[error("VESTING ({}): Action can only be executed by account owner -> {0}", line!())]
#[error("VESTING ({l}): Action can only be executed by account owner -> {0}", l = line!())]
NotOwner(String),
#[error("VESTING ({}): Invalid address: {0}", line!())]
#[error("VESTING ({l}): Invalid address: {0}", l = line!())]
InvalidAddress(String),
#[error("VESTING ({}): Account already exists: {0}", line!())]
#[error("VESTING ({l}): Account already exists: {0}", l = line!())]
AccountAlreadyExists(String),
#[error("VESTING ({}): Staking account already exists: {0}", line!())]
#[error("VESTING ({l}): Staking account already exists: {0}", l = line!())]
StakingAccountAlreadyExists(String),
#[error("VESTING ({}): Too few coins sent for vesting account creation, sent {sent}, need at least {need}", line!())]
#[error("VESTING ({l}): Too few coins sent for vesting account creation, sent {sent}, need at least {need}", l = line!())]
MinVestingFunds { sent: u128, need: u128 },
#[error("VESTING ({}): Maximum amount of locked coins has already been pledged: {current}, cap is {cap}", line!())]
#[error("VESTING ({l}): Maximum amount of locked coins has already been pledged: {current}, cap is {cap}", l = line!())]
LockedPledgeCapReached { current: Uint128, cap: Uint128 },
#[error("VESTING: ({}: Account owned by {owner} has unpopulated vesting periods!", line!())]
#[error("VESTING: ({l}: Account owned by {owner} has unpopulated vesting periods!", l = line!())]
UnpopulatedVestingPeriods { owner: Addr },
#[error("VESTING: Vesting account associated with {0} already exists, only addresses with not existing vesting accounts can be added as staking addresses")]
+6 -6
View File
@@ -59,12 +59,12 @@ pub enum GatewayRequestsError {
source: NymNodeRoutingAddressError,
},
#[error("received request had invalid size. (actual: {0}, but expected one of: {} (ACK), {} (REGULAR), {}, {}, {} (EXTENDED))",
PacketSize::AckPacket.size(),
PacketSize::RegularPacket.size(),
PacketSize::ExtendedPacket8.size(),
PacketSize::ExtendedPacket16.size(),
PacketSize::ExtendedPacket32.size())
#[error("received request had invalid size. (actual: {0}, but expected one of: {a} (ACK), {r} (REGULAR), {e8}, {e16}, {e32} (EXTENDED))",
a = PacketSize::AckPacket.size(),
r = PacketSize::RegularPacket.size(),
e8 = PacketSize::ExtendedPacket8.size(),
e16 = PacketSize::ExtendedPacket16.size(),
e32 = PacketSize::ExtendedPacket32.size())
]
RequestOfInvalidSize(usize),
@@ -7,7 +7,7 @@ use tracing::error;
#[derive(Debug, Error)]
pub enum BandwidthError {
#[error("Provided bandwidth credential asks for more bandwidth than it is supported to add at once (credential value: {0}, supported: {}). Try to split it before attempting again", i64::MAX)]
#[error("Provided bandwidth credential asks for more bandwidth than it is supported to add at once (credential value: {0}, supported: {s}). Try to split it before attempting again", s = i64::MAX)]
UnsupportedBandwidthValue(u64),
#[error("failed to parse the bandwidth voucher value: {source}")]
+1 -1
View File
@@ -21,7 +21,7 @@ tokio = { version = "1", features = ["full"] }
lazy_static = "1.5.0"
# error handling
anyhow = "1.0.95"
thiserror = "1.0.64"
thiserror.workspace = true
[build-dependencies]
uniffi = { version = "0.25.2", features = ["build"] }