Add TooManyConsumers variant to track latest sp-runtime addition (#360)

This commit is contained in:
James Wilson
2021-12-09 13:24:15 +00:00
committed by GitHub
parent 5db9b73899
commit d0a1a79c5f
+4
View File
@@ -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()))
}