Skip to content

Error

Custom exceptions of the loadfig.

loadfig.error.LoadfigError

Bases: Exception

Base class for exceptions in this module.

loadfig.error.ConfigMissingError

ConfigMissingError(config)

Bases: LoadfigError

Exception raised when the configuration file is missing.

Parameters:

Name Type Description Default
config Path

The path to the missing configuration file.

required
Source code in src/loadfig/error.py
def __init__(self, config: pathlib.Path) -> None:
    """Initialize the exception with the missing configuration file path.

    Args:
        config: The path to the missing configuration file.
    """
    super().__init__(f"Specified configuration file {config} not found.")