From d0a1a79c5f33a18c99713758a0fc021e80c20995 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Thu, 9 Dec 2021 13:24:15 +0000 Subject: [PATCH] Add TooManyConsumers variant to track latest sp-runtime addition (#360) --- src/error.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/error.rs b/src/error.rs index 1ff6fc49df..bef8b18aff 100644 --- a/src/error.rs +++ b/src/error.rs @@ -107,6 +107,9 @@ pub enum RuntimeError { /// There are no providers so the account cannot be created. #[error("There are no providers so the account cannot be created.")] NoProviders, + /// There are too many consumers so the account cannot be created. + #[error("There are too many consumers so the account cannot be created.")] + TooManyConsumers, /// Bad origin. #[error("Bad origin: throw by ensure_signed, ensure_root or ensure_none.")] BadOrigin, @@ -141,6 +144,7 @@ impl RuntimeError { DispatchError::CannotLookup => Ok(Self::CannotLookup), DispatchError::ConsumerRemaining => Ok(Self::ConsumerRemaining), DispatchError::NoProviders => Ok(Self::NoProviders), + DispatchError::TooManyConsumers => Ok(Self::TooManyConsumers), DispatchError::Arithmetic(_math_error) => { Ok(Self::Other("math_error".into())) }