Bad exception handling
Throwing a base or generic exception might cause important error information to be lost. This can make your code difficult to maintain. We recommend using built-in exceptions or creating a custom exception class that is derived from `Exception` or one of its subclasses.
def exception_handling_noncompliant(parameter):
    if not isinstance(parameter, int):
        # Noncompliant: a generic exception is thrown.
        raise Exception("param should be an integer")
def exception_handling_compliant(parameter):
    if not isinstance(parameter, int):
        # Compliant: specific exception is thrown.
        raise TypeError("param should be an integer")