Record an error occurrence. Args: operation_name: Name of the operation that failed exception: The exception that occurred
(self, operation_name: str, exception: Exception)
| 339 | self.total_errors = 0 |
| 340 | |
| 341 | def record_error(self, operation_name: str, exception: Exception) -> None: |
| 342 | """Record an error occurrence. |
| 343 | |
| 344 | Args: |
| 345 | operation_name: Name of the operation that failed |
| 346 | exception: The exception that occurred |
| 347 | """ |
| 348 | error_type = type(exception).__name__ |
| 349 | key = f"{operation_name}:{error_type}" |
| 350 | |
| 351 | self.error_counts[key] = self.error_counts.get(key, 0) + 1 |
| 352 | self.total_errors += 1 |
| 353 | |
| 354 | def get_stats(self) -> dict: |
| 355 | """Get current error statistics. |
no test coverage detected