Pattern: Unnecessary exception statement
Issue: -
Used when an exception is created without being assigned, raised or returned for subsequent use elsewhere.
Example of incorrect code:
Exception("This exception is a statement.") # [pointless-exception-statement]
Example of correct code:
raise Exception("This will raise.")