File size: 1,114 Bytes
806bdda
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""

Custom Exception Classes for Vehicle Detection System

======================================================



Defines custom exceptions for better error handling and user feedback.



Authors:

    - Abhay Gupta (0205CC221005)

    - Aditi Lakhera (0205CC221011)

    - Balraj Patel (0205CC221049)

    - Bhumika Patel (0205CC221050)

"""


class VehicleDetectionError(Exception):
    """Base exception for vehicle detection system."""
    pass


class VideoProcessingError(VehicleDetectionError):
    """Raised when video processing fails."""
    pass


class ModelLoadError(VehicleDetectionError):
    """Raised when model loading fails."""
    pass


class ConfigurationError(VehicleDetectionError):
    """Raised when configuration is invalid."""
    pass


class DetectionError(VehicleDetectionError):
    """Raised when object detection fails."""
    pass


class TrackingError(VehicleDetectionError):
    """Raised when object tracking fails."""
    pass


class SpeedEstimationError(VehicleDetectionError):
    """Raised when speed estimation fails."""
    pass