Skip to content

Exceptions (exceptions.py)

Exceptions

pymultiwfn.api.exceptions

Exceptions for pymultiwfn interface.

InvalidInputFileError

Bases: MultiwfnError

Raised when an input file extension is unsupported by Multiwfn.

Source code in src/pymultiwfn/api/exceptions.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class InvalidInputFileError(MultiwfnError):
    """Raised when an input file extension is unsupported by Multiwfn."""

    def __init__(
        self,
        input_path: str,
        extension: str,
        supported_extensions: tuple[str, ...],
    ) -> None:
        supported = ", ".join(supported_extensions)
        message = (
            f"Unsupported Multiwfn input file: '{input_path}' (extension "
            f"'{extension or '<none>'}'). Supported extensions include: "
            f"{supported}. See Multiwfn manual input-format section."
        )
        super().__init__(message)

MultiwfnError

Bases: Exception

Base exception for pyMultiwfn errors.

Source code in src/pymultiwfn/api/exceptions.py
4
5
6
7
class MultiwfnError(Exception):
    """Base exception for pyMultiwfn errors."""

    pass