exceptions
lacuna.core.exceptions
¶
Base exception hierarchy for the lacuna toolkit.
All custom exceptions inherit from LacunaError to enable precise error handling while maintaining compatibility with standard Python exceptions.
AnalysisError
¶
Bases: LacunaError, RuntimeError
Raised when analysis computation fails.
AtlasNotFoundError
¶
Bases: LacunaError, FileNotFoundError
Raised when atlas cannot be found or resolved.
AuthenticationError
¶
Bases: FetchError
Raised when authentication fails (missing or invalid API key).
Source code in src/lacuna/core/exceptions.py
BIDSValidationError
¶
Bases: LacunaError, ValueError
Raised when BIDS dataset structure is invalid.
ChecksumError
¶
Bases: FetchError
Raised when file checksum verification fails.
Source code in src/lacuna/core/exceptions.py
ConnectomeNotFoundError
¶
Bases: LacunaError, FileNotFoundError
Raised when connectome cannot be found or resolved.
CoordinateSpaceError
¶
Bases: LacunaError, ValueError
Raised when operations require specific coordinate space.
DownloadError
¶
Bases: FetchError
Raised when download fails after retries.
Source code in src/lacuna/core/exceptions.py
EmptyMaskError
¶
Bases: ValidationError
Raised when a mask contains no non-zero voxels.
Source code in src/lacuna/core/exceptions.py
FetchError
¶
Bases: LacunaError
Base exception for all fetch/download errors.
LacunaError
¶
NiftiLoadError
¶
Bases: LacunaError, IOError
Raised when NIfTI file loading fails.
ProcessingError
¶
Bases: FetchError
Raised when post-download processing fails.
Source code in src/lacuna/core/exceptions.py
ProvenanceError
¶
Bases: LacunaError, RuntimeError
Raised when provenance tracking encounters issues.
SpaceDetectionError
¶
Bases: LacunaError
Raised when coordinate space cannot be detected from file.
Source code in src/lacuna/core/exceptions.py
SpaceMismatchError
¶
Bases: ValidationError
Raised when declared space doesn't match detected space.
Source code in src/lacuna/core/exceptions.py
SpatialMismatchError
¶
Bases: ValidationError
Raised when spatial properties (affine, shape) don't match.
TransformDownloadError
¶
Bases: LacunaError
Raised when transform file cannot be downloaded.
Source code in src/lacuna/core/exceptions.py
TransformNotAvailableError
¶
Bases: LacunaError
Raised when spatial transform is not available.