# No exception handling
num = int('yyt')
print(num) # Report errors
# exception handling
try:
num = int('yyt') #try The code in is protected
print(num)
except Exception as e:
print(e) # Output invalid literal for int() with base 10: 'abc', Program running normally
eg:
if debug:
tracked_bb, exec_times = tracker.run(seq, debug=debug)
else:
try:
tracked_bb, exec_times = tracker.run(seq, debug=debug)
except Exception as e:
print(e)
return
First , In the current big dat
有限單