IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
exceptions.py
Go to the documentation of this file.
2from ids_peak_icv.backend.datatypes import peak_icv_status
3
4
6 """!
7 @brief
8 Base class for all exceptions thrown by the IDS peak ICV library.
9
10 @param message: Exception message.
11 @param status: peak_icv_status associated with the exception.
12
13 @since ids_peak_icv 1.0
14 """
15
16 def __init__(self, message: str, status: peak_icv_status):
17 super().__init__(message)
18 self.status = status
19
20
22 """!
23 @brief
24 Thrown when the library configuration is invalid.
25
26 This can occur if a required dependency is missing, the library is not initialized,
27 or other misconfiguration issues arise.
28
29 @since ids_peak_icv 1.0
30 """
31
32 def __init__(self, message: str, status: peak_icv_status):
33 super().__init__(message, status)
34
35
37 ICVException,
39):
40 """!
41 @brief
42 Thrown on unexpected internal system errors.
43
44 Occurs when a failure happens during processing due to an unhandled condition
45 in the routine.
46
47 @since ids_peak_icv 1.0
48 """
49
50 def __init__(self, message: str):
51 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_INTERNAL_ERROR)
52
53
55 """!
56 @brief
57 Thrown when input parameters do not match the expected conditions.
58
59 For example, this occurs when two input images have different sizes but identical sizes are required.
60
61 @since ids_peak_icv 1.0
62 """
63
64 def __init__(self, message: str):
65 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_MISMATCH)
66
67
69 ICVException,
71):
72 """!
73 @brief
74 Thrown when a requested operation is not implemented or supported.
75
76 This occurs, for example, when trying to export to an unsupported file format.
77
78 @since ids_peak_icv 1.0
79 """
80
81 def __init__(self, message: str):
82 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_NOT_SUPPORTED)
83
84
86 """!
87 @brief
88 Thrown when an operation cannot be performed due to logical constraints.
89
90 For example, this occurs when attempting camera calibration without any input images.
91
92 @since ids_peak_icv 1.0
93 """
94
95 def __init__(self, message: str):
96 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_NOT_POSSIBLE)
97
98
100 ICVException,
102):
103 """!
104 @brief
105 Thrown when a value is outside the allowed range.
106
107 This occurs, for example, when setting opacity to 101 although the valid range is 0–100.
108
109 @since ids_peak_icv 1.0
110 """
111
112 def __init__(self, message: str):
113 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_OUT_OF_RANGE)
114
115
117 """!
118 @brief
119 Thrown when a mathematical computation fails.
120
121 This occurs, for example, in cases such as division by zero or invalid operations in matrix computations.
122
123 @since ids_peak_icv 1.0
124 """
125
126 def __init__(self, message: str):
127 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_MATH_ERROR)
128
129
131 """!
132 @brief
133 Thrown when an expected target object is not detected in the input image.
134
135 This occurs, for example, when a calibration plate or marker is missing or not detected in an input image.
136
137 @since ids_peak_icv 1.0
138 """
139
140 def __init__(self, message: str):
141 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_TARGET_NOT_FOUND)
142
143
145 """!
146 @brief
147 Thrown when input data or a file is malformed, unreadable, or otherwise corrupted.
148
149 This occurs when reading from a file or stream that is incomplete, damaged, or in an unexpected format.
150
151 @since ids_peak_icv 1.0
152 """
153
154 def __init__(self, message: str):
155 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_CORRUPTED)
156
157
159 ICVException,
161):
162 """!
163 @brief
164 Thrown when a file input/output operation fails.
165
166 This can occur due to reasons such as a missing file, insufficient permissions, or an inaccessible directory.
167
168 @since ids_peak_icv 1.0
169 """
170
171 def __init__(self, message: str):
172 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_IO_ERROR)
173
174
176 """!
177 @brief
178 Thrown when attempting to access an object or value that has not been initialized.
179
180 Indicates usage of a null pointer.
181
182 @since ids_peak_icv 1.0
183 """
184
185 def __init__(self, message: str):
186 super().__init__(message, peak_icv_status.PEAK_ICV_STATUS_NULL_POINTER)
Base class for all exceptions thrown by the library.
Definition exceptions.py:1
Thrown when an input, output, file or device communication error occurs.
Thrown when an unexpected internal error occurs.
Definition exceptions.py:41
Thrown when an unsupported operation or feature is used.
Thrown when a parameter is outside the valid range.
Definition exceptions.py:79
Thrown when input data or a file is malformed, unreadable, or otherwise corrupted.
Base class for all exceptions thrown by the IDS peak ICV library.
Definition exceptions.py:5
__init__(self, str message, peak_icv_status status)
Definition exceptions.py:16
Thrown when a file input/output operation fails.
Thrown on unexpected internal system errors.
Definition exceptions.py:39
Thrown when the library configuration is invalid.
Definition exceptions.py:21
__init__(self, str message, peak_icv_status status)
Definition exceptions.py:32
Thrown when a mathematical computation fails.
Thrown when input parameters do not match the expected conditions.
Definition exceptions.py:54
Thrown when an operation cannot be performed due to logical constraints.
Definition exceptions.py:85
Thrown when a requested operation is not implemented or supported.
Definition exceptions.py:71
Thrown when attempting to access an object or value that has not been initialized.
Thrown when a value is outside the allowed range.
Thrown when an expected target object is not detected in the input image.