.. _overlapping-except:

overlapping-except / W0714
==========================

**Message emitted:**

Overlapping exceptions (%s)

**Description:**

*Used when exceptions in handler overlap or are identical*

**Problematic code:**

.. literalinclude:: /data/messages/o/overlapping-except/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/o/overlapping-except/good.py
   :language: python


**Related links:**

- `Exception hierarchy <https://docs.python.org/3/library/exceptions.html#exception-hierarchy>`_


.. note::
  This message is emitted by the optional :ref:`'overlap-except'<pylint.extensions.overlapping_exceptions>`
   checker which requires the ``pylint.extensions.overlapping_exceptions`` plugin to be loaded.

Created by the `overlap-except <https://github.com/PyCQA/pylint/blob/main/pylint/extensions/overlapping_exceptions.py>`__ checker.