Source code for zcollection.errors

# Copyright (c) 2022-2026 CNES.
#
# All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
"""Exception taxonomy for zcollection v3."""


[docs] class ZCollectionError(Exception): """Base class for all zcollection errors."""
[docs] class SchemaError(ZCollectionError): """Raised when a schema is invalid or inconsistent with data."""
class FormatVersionError(ZCollectionError): """Raised when an on-disk format version is unsupported.""" class PartitionError(ZCollectionError): """Raised when a partition cannot be located, encoded, or decoded.""" class ExpressionError(ZCollectionError): """Raised when a partition filter expression is invalid."""
[docs] class StoreError(ZCollectionError): """Raised by the store layer for I/O or transactional failures."""
[docs] class CollectionExistsError(ZCollectionError): """Raised when create_collection targets a path that already exists."""
[docs] class CollectionNotFoundError(ZCollectionError): """Raised when open_collection cannot locate a collection."""
[docs] class ReadOnlyError(ZCollectionError): """Raised when a write op is attempted on a read-only collection."""
class UpgradeError(ZCollectionError): """Raised when a v2 entry point or removed argument is used."""