.. _broad-exception-raised: broad-exception-raised / W0719 ============================== **Message emitted:** ``Raising too general exception: %s`` **Description:** *Raising exceptions that are too generic force you to catch exceptions generically too. It will force you to use a naked ``except Exception:`` clause. You might then end up catching exceptions other than the ones you expect to catch. This can hide bugs or make it harder to debug programs when unrelated errors are hidden.* **Problematic code:** .. literalinclude:: /data/messages/b/broad-exception-raised/bad.py :language: python **Correct code:** .. literalinclude:: /data/messages/b/broad-exception-raised/good.py :language: python **Related links:** - `Programming recommendation in PEP8 `_ Created by the `exceptions `__ checker.