.. _raising-non-exception:

raising-non-exception / E0710
=============================

**Message emitted:**

Raising a new style class which doesn't inherit from BaseException

**Description:**

*Used when a new style class which doesn't inherit from BaseException is raised.*

**Problematic code:**

.. literalinclude:: /data/messages/r/raising-non-exception/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/r/raising-non-exception/good.py
   :language: python



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