File size: 1,256 Bytes
2c41dce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""
Custom exception types for the proof-of-existence system.
All agents raise these typed errors for consistent error handling.
"""

class ProofSystemError(Exception):
    """Base exception for all proof system errors."""
    pass


class ValidationError(ProofSystemError):
    """Raised when input validation fails."""
    pass


class HashingError(ProofSystemError):
    """Raised when hashing operation fails."""
    pass


class MetadataError(ProofSystemError):
    """Raised when metadata generation fails."""
    pass


class StorageError(ProofSystemError):
    """Raised when storage operations fail."""
    pass


class VerificationError(ProofSystemError):
    """Raised when proof verification fails."""
    pass


class ProofNotFoundError(ProofSystemError):
    """Raised when a proof cannot be found in storage."""
    pass


class OCRError(ProofSystemError):
    """Base exception for OCR-related errors."""
    pass


class OCRNotApplicableError(OCRError):
    """Raised when OCR is not applicable to the content type."""
    pass


class OCRProcessingError(OCRError):
    """Raised when OCR processing fails."""
    pass


class OCRDependencyMissingError(OCRError):
    """Raised when Tesseract OCR is not installed or not found."""
    pass