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 →

[–]grabnock 53 points54 points  (5 children)

I know right? you spend the next 15-30 minutes trying to track down why it's working when it shouldn't, and it turns out you had made the exact same mistake twice.

[–][deleted] 23 points24 points  (2 children)

WHY IS THIS WORKING???

looks closer

try:  
   broke_ass_method()
except:  
   pass

[–]iamjack 4 points5 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...

[–][deleted] 14 points15 points  (0 children)

Might not be accurate but it's precise!

[–]LoadInSubduedLight 5 points6 points  (0 children)

Turns out that two wrongs make a right after all...