In my application I have a lot of conditions under which it is non-sensical to run the app further.
Currently I do something like this:
try:
some_fun()
except Exception as e:
print(f'Some short description: {str(e)}')
sys.exit(1)
There is a lot of boilerplate so I'd like to avoid it. I'm looking for something that would allow me to pass the string Some short description as a parameter and automate handling the exception of any kind.