Skip to content

Errors

Custom Exceptions for Ramifice.

AttributeCannotBeDeleteError

Bases: RamificeException

Exception is raised if the attribute cannot be delete.

Source code in src/ramifice/errors.py
class AttributeCannotBeDeleteError(RamificeException):
    """Exception is raised if the attribute cannot be delete."""

    def __init__(self, attribute_name: str) -> None:
        """Exception is raised if the attribute cannot be delete."""
        self.message = f"The attribute `{attribute_name}` cannot be delete!"
        super().__init__(self.message)

__init__(attribute_name)

Exception is raised if the attribute cannot be delete.

Source code in src/ramifice/errors.py
def __init__(self, attribute_name: str) -> None:
    """Exception is raised if the attribute cannot be delete."""
    self.message = f"The attribute `{attribute_name}` cannot be delete!"
    super().__init__(self.message)

DoesNotMatchRegexError

Bases: RamificeException

Exception raised if does not match the regular expression.

Source code in src/ramifice/errors.py
class DoesNotMatchRegexError(RamificeException):
    """Exception raised if does not match the regular expression."""

    def __init__(self, regex_str: str) -> None:
        """Exception raised if does not match the regular expression.

        Args:
            regex_str: regular expression in string representation
        """
        self.message = f"Does not match the regular expression: {regex_str}"
        super().__init__(self.message)

__init__(regex_str)

Exception raised if does not match the regular expression.

Parameters:

Name Type Description Default
regex_str str

regular expression in string representation

required
Source code in src/ramifice/errors.py
def __init__(self, regex_str: str) -> None:
    """Exception raised if does not match the regular expression.

    Args:
        regex_str: regular expression in string representation
    """
    self.message = f"Does not match the regular expression: {regex_str}"
    super().__init__(self.message)

FileHasNoExtensionError

Bases: RamificeException

Exception raised if the file has no extension.

Source code in src/ramifice/errors.py
class FileHasNoExtensionError(RamificeException):
    """Exception raised if the file has no extension."""

    def __init__(self, message: str = "File has no extension!") -> None:
        """Exception raised if the file has no extension.

        Args:
            message: explanation of the error
        """
        self.message = message
        super().__init__(self.message)

__init__(message='File has no extension!')

Exception raised if the file has no extension.

Parameters:

Name Type Description Default
message str

explanation of the error

'File has no extension!'
Source code in src/ramifice/errors.py
def __init__(self, message: str = "File has no extension!") -> None:
    """Exception raised if the file has no extension.

    Args:
        message: explanation of the error
    """
    self.message = message
    super().__init__(self.message)

ForbiddenDeleteDocError

Bases: RamificeException

Exception is raised when trying to delete the document.

Source code in src/ramifice/errors.py
class ForbiddenDeleteDocError(RamificeException):
    """Exception is raised when trying to delete the document."""

    def __init__(self, message: str) -> None:
        """Exception is raised when trying to delete the document.

        Args:
            message: explanation of the error
        """
        self.message = message
        super().__init__(self.message)

__init__(message)

Exception is raised when trying to delete the document.

Parameters:

Name Type Description Default
message str

explanation of the error

required
Source code in src/ramifice/errors.py
def __init__(self, message: str) -> None:
    """Exception is raised when trying to delete the document.

    Args:
        message: explanation of the error
    """
    self.message = message
    super().__init__(self.message)

NoModelsForMigrationError

Bases: RamificeException

Exception raised if no Models for migration.

Source code in src/ramifice/errors.py
class NoModelsForMigrationError(RamificeException):
    """Exception raised if no Models for migration."""

    def __init__(self) -> None:
        """Exception raised if no Models for migration."""
        self.message = "No Models for Migration!"
        super().__init__(self.message)

__init__()

Exception raised if no Models for migration.

Source code in src/ramifice/errors.py
def __init__(self) -> None:
    """Exception raised if no Models for migration."""
    self.message = "No Models for Migration!"
    super().__init__(self.message)

NotPossibleAddUnitError

Bases: RamificeException

Exception is raised when not possible to add Unit.

Source code in src/ramifice/errors.py
class NotPossibleAddUnitError(RamificeException):
    """Exception is raised when not possible to add Unit."""

    def __init__(self, message: str) -> None:
        """Exception is raised when not possible to add Unit.

        Args:
            message: explanation of the error
        """
        self.message = message
        super().__init__(self.message)

__init__(message)

Exception is raised when not possible to add Unit.

Parameters:

Name Type Description Default
message str

explanation of the error

required
Source code in src/ramifice/errors.py
def __init__(self, message: str) -> None:
    """Exception is raised when not possible to add Unit.

    Args:
        message: explanation of the error
    """
    self.message = message
    super().__init__(self.message)

NotPossibleDeleteUnitError

Bases: RamificeException

Exception is raised when not possible to delete Unit.

Source code in src/ramifice/errors.py
class NotPossibleDeleteUnitError(RamificeException):
    """Exception is raised when not possible to delete Unit."""

    def __init__(self, message: str) -> None:
        """Exception is raised when not possible to delete Unit.

        Args:
            message: explanation of the error
        """
        self.message = message
        super().__init__(self.message)

__init__(message)

Exception is raised when not possible to delete Unit.

Parameters:

Name Type Description Default
message str

explanation of the error

required
Source code in src/ramifice/errors.py
def __init__(self, message: str) -> None:
    """Exception is raised when not possible to delete Unit.

    Args:
        message: explanation of the error
    """
    self.message = message
    super().__init__(self.message)

OldPassNotMatchError

Bases: RamificeException

Exception is raised when trying to update the password.

Hint: If old password does not match.

Source code in src/ramifice/errors.py
class OldPassNotMatchError(RamificeException):
    """Exception is raised when trying to update the password.

    Hint: If old password does not match.
    """

    def __init__(self) -> None:
        """Exception is raised when trying to update the password.

        Hint: If old password does not match.
        """
        self.message = "Old password does not match!"
        super().__init__(self.message)

__init__()

Exception is raised when trying to update the password.

Hint: If old password does not match.

Source code in src/ramifice/errors.py
def __init__(self) -> None:
    """Exception is raised when trying to update the password.

    Hint: If old password does not match.
    """
    self.message = "Old password does not match!"
    super().__init__(self.message)

PanicError

Bases: RamificeException

Exception raised for cases of which should not be.

Source code in src/ramifice/errors.py
class PanicError(RamificeException):
    """Exception raised for cases of which should not be."""

    def __init__(self, message: str) -> None:
        """Exception raised for cases of which should not be.

        Args:
            message: explanation of the error
        """
        self.message = message
        super().__init__(self.message)

__init__(message)

Exception raised for cases of which should not be.

Parameters:

Name Type Description Default
message str

explanation of the error

required
Source code in src/ramifice/errors.py
def __init__(self, message: str) -> None:
    """Exception raised for cases of which should not be.

    Args:
        message: explanation of the error
    """
    self.message = message
    super().__init__(self.message)

RamificeException

Bases: Exception

Root Exception for Ramifice.

Source code in src/ramifice/errors.py
class RamificeException(Exception):
    """Root Exception for Ramifice."""

    def __init__(self, *args, **kwargs) -> None:
        """Root Exception for Ramifice."""
        super().__init__(*args, **kwargs)

__init__(*args, **kwargs)

Root Exception for Ramifice.

Source code in src/ramifice/errors.py
def __init__(self, *args, **kwargs) -> None:
    """Root Exception for Ramifice."""
    super().__init__(*args, **kwargs)