Source code for astrosylva.exceptions

"""Exception and warning types for astrosylva."""

from __future__ import annotations


[docs] class AstroSylvaError(Exception): """Base class for all astrosylva errors."""
[docs] class ConfigError(AstroSylvaError): """Raised when the user-supplied configuration is invalid."""
[docs] class ReaderError(AstroSylvaError): """Raised when a reader cannot parse its input."""
[docs] class WriterError(AstroSylvaError): """Raised when the writer cannot produce its output."""
[docs] class MetadataConflictWarning(UserWarning): """Reader-introspected metadata conflicts with config-supplied metadata. The reader value wins; the warning surfaces both values so the user can decide whether the config is wrong. """