.. _bare-except:

bare-except / W0702
===================

**Message emitted:**

No exception type(s) specified

**Description:**

*Used when an except clause doesn't specify exceptions type to catch.*

**Problematic code:**

.. literalinclude:: /data/messages/b/bare-except/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/b/bare-except/good.py
   :language: python



Created by the `exceptions <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/exceptions.py>`__ checker.