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:

raise str  # [raising-non-exception]

Correct code:

raise Exception("Goodbye world !")

Created by the exceptions checker.