InsufficientFundsError(Exception) that stores the shortfall amount, then write withdraw(balance, amount) returning the new balance or raising that error with the shortfall when amount > balance. The caller should be able to read err.shortfall.withdraw(100, 250)
raises InsufficientFundsError with shortfall == 150
250 exceeds the balance by 150.
Override __init__, call super().__init__(msg), store the attribute.
raise InsufficientFundsError(amount - balance).