Is there any way, how to find out line of code, where I called: raise MyError("something")??
I have code like this:
class MyError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
Can I get the line of exception in this class?
Calling like this:
try:
somethin()
except:
raise MyError("abc")
Thank you