Summary
From the rule's documentation (PLW0133):
Known problems
This rule only detects built-in exceptions, like ValueError, and does not catch user-defined exceptions.
So currently this is caught:
def foo():
ValueError("...")
But not this. But I would love if it would, it would have spared me 1hr of debugging this morning :)
class MyCustomError(Exception):
...
def foo():
MyCustomError("...")