Source code for multihash.exceptions

"""Custom exception hierarchy for multihash operations."""


[docs] class MultihashError(Exception): """Base exception for multihash errors.""" pass
[docs] class InvalidMultihashError(MultihashError): """Raised when multihash is invalid.""" pass
[docs] class UnsupportedCodeError(MultihashError): """Raised when hash code is not supported.""" pass
[docs] class HashComputationError(MultihashError): """Raised when hash computation fails.""" pass
[docs] class TruncationError(MultihashError): """Raised when truncation length is invalid.""" pass