this is raising an AttributeError in the moment:
from functions import *
class Class:
def __init__(self):
self.name = 'Name'
@exception_handler
def do_stuff(self):
print('Stuff')
if __name__ == '__main__':
test = Class()
test.dooo_stuff()
AttributeError: 'Class' object has no attribute 'dooo_stuff'
I want to catch this Attribute Error somehow with an Decorator in Background. So that i can inform the user that the class method name has changed.
So
try:
test = Class()
test.dooo_stuff()
except AttributeError:
print('info')
will not work because that is not in Background. I want to change the Error Message above to notify the user. Is there any way to do that? Thanks