Coverage for dantinox / exceptions.py: 100%
6 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-30 21:34 +0200
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-30 21:34 +0200
1"""
2DantinoX exception hierarchy.
4Catch ``DantinoXError`` to handle any library error; use the sub-classes for
5finer-grained control.
7 DantinoXError
8 ├── ConfigError — invalid or inconsistent Config
9 ├── CheckpointError — missing or corrupt checkpoint files
10 ├── BenchmarkError — failure during benchmarking
11 └── PlotError — failure during plot generation
12"""
14from __future__ import annotations
17class DantinoXError(Exception):
18 """Base class for all DantinoX exceptions."""
21class ConfigError(DantinoXError):
22 """Raised when a :class:`~core.config.Config` is invalid or inconsistent."""
25class CheckpointError(DantinoXError):
26 """Raised when a run directory, config file, or weights file cannot be loaded."""
29class BenchmarkError(DantinoXError):
30 """Raised when benchmarking a run fails."""
33class PlotError(DantinoXError):
34 """Raised when plot generation fails."""