Loading...

verticapy.errors.EmptyParameter#

exception verticapy.errors.EmptyParameter#

An exception raised when a function or operation requires a parameter, and the provided parameter is empty or lacks the required information. This error typically indicates that essential information is missing, hindering the successful execution of the function or operation.

Examples#

The following function checks if the input list is not empty. It raises an error if that is the case.

from verticapy.errors import EmptyParameter

def is_empty_list(L: list):

    if L in ([], None):

        raise EmptyParameter(
            "The input list is empty."
        )

Note

Errors can be employed when implementing new functions to provide clear explanations for why a particular option or feature is not functioning as intended. It is essential to review all available errors to choose the most appropriate one.