Source code for aeat.adapters.outbound.aeat.export._errors
"""Exception types for AEAT outbound export-format adapters.The classes here cover fichero-BOE serialisation and layout failures inthe outbound export adapter. They are separate from the local submissionlifecycle errors in :mod:`domain.submission` and from the permanentlive-write refusal raised by :mod:`core.access_gate`."""from__future__importannotationsfrom.....core.errorsimportAeatError
[docs]classExportError(AeatError):"""Base class for outbound AEAT export-format adapter errors. Catch this root for failures emitted by registry-backed fichero-BOE serialisation helpers. Submission lifecycle failures remain under :class:`~domain.submission.SubmissionError`. """
[docs]classAeatExportFormatError(ExportError,ValueError):"""Raised when a filing draft cannot be serialised to a concrete BOE format. Inherits from ValueError to maintain compatibility with Pydantic validators and other standard library consumers that expect value-related failures. See Also: :mod:`adapters.outbound.aeat.export._formats` Fixed-width record-spec, serialisation, and deserialisation helpers that raise this error for layout or value violations. :class:`~domain.submission.SubmissionPreflightError` Domain-level refusal raised before a local submission lifecycle transition is allowed. """