airbyte_cdk.sources.concurrent_source.stream_thread_exception
1# Copyright (c) 2024 Airbyte, Inc., all rights reserved. 2 3from typing import Any 4 5 6class StreamThreadException(Exception): 7 def __init__(self, exception: Exception, stream_name: str): 8 self._exception = exception 9 self._stream_name = stream_name 10 11 @property 12 def stream_name(self) -> str: 13 return self._stream_name 14 15 @property 16 def exception(self) -> Exception: 17 return self._exception 18 19 def __str__(self) -> str: 20 return f"Exception while syncing stream {self._stream_name}: {self._exception}" 21 22 def __eq__(self, other: Any) -> bool: 23 if isinstance(other, StreamThreadException): 24 return self._exception == other._exception and self._stream_name == other._stream_name 25 return False
class
StreamThreadException(builtins.Exception):
7class StreamThreadException(Exception): 8 def __init__(self, exception: Exception, stream_name: str): 9 self._exception = exception 10 self._stream_name = stream_name 11 12 @property 13 def stream_name(self) -> str: 14 return self._stream_name 15 16 @property 17 def exception(self) -> Exception: 18 return self._exception 19 20 def __str__(self) -> str: 21 return f"Exception while syncing stream {self._stream_name}: {self._exception}" 22 23 def __eq__(self, other: Any) -> bool: 24 if isinstance(other, StreamThreadException): 25 return self._exception == other._exception and self._stream_name == other._stream_name 26 return False
Common base class for all non-exit exceptions.