Hacker News new | ask | show | jobs
by btilly 4671 days ago
This is NOT OK. You're swallowing all exceptions and assuming that they are your special case.

The fix is to have a specific nonambiguous name for your exception, so that other error conditions still work properly. As examples consider the StopIteration and GeneratorExit exceptions from Python's standard library. (See http://docs.python.org/2/library/exceptions.html for a list of built-in exceptions.)