feat: pdf2cad
This commit is contained in:
28
src/pdf2imos/errors.py
Normal file
28
src/pdf2imos/errors.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Custom exception hierarchy for pdf2imos pipeline."""
|
||||
|
||||
|
||||
class Pdf2ImosError(Exception):
|
||||
"""Base exception for all pdf2imos errors."""
|
||||
|
||||
|
||||
class PdfExtractionError(Pdf2ImosError):
|
||||
"""Raised when PDF extraction fails.
|
||||
|
||||
Covers: invalid/corrupt PDF, empty PDF (0 pages),
|
||||
raster-only PDF (no vector content).
|
||||
"""
|
||||
|
||||
|
||||
class ViewSegmentationError(Pdf2ImosError):
|
||||
"""Raised when view segmentation fails."""
|
||||
|
||||
|
||||
class DimensionExtractionError(Pdf2ImosError):
|
||||
"""Raised when dimension extraction or assembly fails.
|
||||
|
||||
Covers: no dimensions found, assembly returns None.
|
||||
"""
|
||||
|
||||
|
||||
class OutputWriteError(Pdf2ImosError):
|
||||
"""Raised when writing output files (DXF/JSON/DWG) fails."""
|
||||
Reference in New Issue
Block a user