Skip to content

ColumnSizeError

Bases: Exception

Exception raised for trying to use a column of unsupported size.

Parameters:

Name Type Description Default
expected_size str

The expected size of the column as an expression (e.g. 2, >0, !=0).

required
actual_size str

The actual size of the column as an expression (e.g. 2, >0, !=0).

required
Source code in src/safeds/exceptions/_data.py
class ColumnSizeError(Exception):
    """
    Exception raised for trying to use a column of unsupported size.

    Parameters
    ----------
    expected_size:
        The expected size of the column as an expression (e.g. 2, >0, !=0).
    actual_size:
        The actual size of the column as an expression (e.g. 2, >0, !=0).
    """

    def __init__(self, expected_size: str, actual_size: str):
        super().__init__(f"Expected a column of size {expected_size} but got column of size {actual_size}.")