Can someone explain the last bit:
print(f"Unexpected error: {error}")
sys.exit(1)
How is that any different than just letting the exception throw all the way out?Is all this doing is making sure the exit code is 1 instead of some other non-zero value?
I'm not seeing how this is any better than just letting the program hard-crash.
(I am asking in earnest. I'm getting back into Python and wanting to know what's generally preferred)