Exception caught which does not inherit from `Exception`PYL-E0712
For an exception to be caught, it must inherit from the Exception
class.
Bad practice
try:
if foo < 5:
print('foo is small')
except NotImplemented: # This is not an error class!
print('Some error occured')
Recommended
Bad practice
try:
if foo < 5:
print('foo is small')
except NotImplementedError: # This is a valid error class
print('Some error occured')