broad-exception-caught / W0718#

Message emitted:

Catching too general exception %s

Description:

Used when an except catches a too general exception, possibly burying unrelated errors.

Problematic code:

try:
    1 / 0
except Exception:  # [broad-exception-caught]
    pass

Correct code:

try:
    1 / 0
except ZeroDivisionError:
    pass

Created by the exceptions checker.