f"Wallet of a user with id {self.wallet.owner_id} for the guild with id {self.wallet.guild_id} does not have sufficient funds to perform the operation (balance: {self.wallet.balance}, requested: {self.amount})"
"""Wallet's overdraft limit is not sufficient to perform the operation"""
def__init__(
self,
wallet:"Wallet",
amount:float,
overdraft_limit:float,
)->None:
self.wallet=wallet
self.amount=amount
self.overdraft_limit=overdraft_limit
super().__init__(
f"Wallet of a user with id {self.wallet.owner_id} for the guild with id {self.wallet.guild_id} does not have sufficient funds to perform the operation (balance: {self.wallet.balance}, requested: {self.amount}, overdraft limit: {self.overdraft_limit})"
)
classWalletBalanceLimitExceeded(Exception):
"""Wallet's balance limit is not high enough to perform the operation"""
def__init__(
self,
wallet:"Wallet",
amount:float,
balance_limit:float,
)->None:
self.wallet=wallet
self.amount=amount
self.balance_limit=balance_limit
super().__init__(
f"Wallet of a user with id {self.wallet.owner_id} for the guild with id {self.wallet.guild_id} would have too much funds after the operation (balance: {self.wallet.balance}, deposited: {self.amount}, balance limit: {self.balance_limit})"