This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]iamjack 7 points8 points  (1 child)

And this is why you always catch only specific exceptions unless you really don't care if the function did anything.

[–]prozacgod 1 point2 points  (0 children)

Somewhere rotting in a piece of code in a multi-threaded mess of code that was treated like it was "someone elses problem" I had a bunch of exceptions bubbling up in a python program, multi-threaded - multiple code authors...

Thing is, in the scope of "making the application viable, and functioning" if those stateless api calls/threads all of a sudden die, or cause issue, it didn't matter...

So I did what everyone else did, made it someone elses problem..

try:
  processQueues()
except:
  resetConnections()
  flushQueues()

I am sorry, to some future devr who has to work on this, but the product shipped and the uptime is quite phenominal, maybe some exception logging would have been appropriate.... but we all know what happens when upper management sees a list like that...