Skip to content

DuplicateColumnNameError

Bases: Exception

Exception raised for trying to modify a table resulting in a duplicate column name.

Parameters:

Name Type Description Default
column_name str

The name of the column that resulted in a duplicate.

required
Source code in src/safeds/exceptions/_data.py
class DuplicateColumnNameError(Exception):
    """
    Exception raised for trying to modify a table resulting in a duplicate column name.

    Parameters
    ----------
    column_name : str
        The name of the column that resulted in a duplicate.
    """

    def __init__(self, column_name: str):
        super().__init__(f"Column '{column_name}' already exists.")

__init__(column_name)

Source code in src/safeds/exceptions/_data.py
def __init__(self, column_name: str):
    super().__init__(f"Column '{column_name}' already exists.")