Source code for schwifty.exceptions
[docs]
class SchwiftyException(ValueError): # noqa: N818
"""Base exception of all schwifty related errors."""
[docs]
class InvalidLength(SchwiftyException):
"""Indicates that the length of the input does not match the specifcation."""
[docs]
class InvalidStructure(SchwiftyException):
"""Indicates a strctural error of the input (e.g. invalid characters)."""
[docs]
class InvalidBankCode(SchwiftyException):
"""Indicates that the bank code has an invalid structure."""
[docs]
class InvalidBranchCode(SchwiftyException):
"""Indicates that the branch code has an invalid strucutre."""
[docs]
class InvalidAccountCode(SchwiftyException):
"""Indicates that the account code has an invalid strucutre."""
[docs]
class InvalidChecksumDigits(SchwiftyException):
"""Indicates that the IBAN's checksum is invalid."""
[docs]
class InvalidBBANChecksum(SchwiftyException):
"""Indicates that the BBAN's checksum is invalid."""
[docs]
class GenerateRandomOverflowError(SchwiftyException):
"""Indicates that during random entity generation no valid value could be found.
This could for example be the case if the national checksum digit does not compute for
a randomly chosen account code.
"""