Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
class InsufficientFundsError(Exception): def __init__(self, amount): super().__init__(f"Need {amount} more") self.amount = amount try: raise InsufficientFundsError(50) except InsufficientFundsError as e: print(e)
Result
Open