I would like when there is an error that it would display what line the error occurred at. I am unsure how I can obtain the line # that the error happened at though. Any help would be appreciated.
def main():
while True:
try:
function1()
function2()
function3()
except:
print('error occur at line ' + str(errorline))