This is my code snippet of trying to create a custom exception class which takes a input parameter about the exception
class Error(Exception):
pass
mssg = "None"
class timepasserror(mssg ,Error):
print(f"the error is {mssg}")
and I am planning to use it as mentioned below
if 1==1:#some conditon
raise timepasserror('something')
I am getting this error :
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
I am not sure if its possible to do so . If yes can anyone guide me Thanks