We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 429c76d commit 2ab1933Copy full SHA for 2ab1933
ipykernel/thread.py
@@ -25,6 +25,11 @@ def __init__(self, **kwargs):
25
self.is_pydev_daemon_thread = True
26
self._tasks: Queue[tuple[str, Callable[[], Awaitable[Any]]] | None] = Queue()
27
self._result: Queue[Any] = Queue()
28
+ self._exception: Exception | None = None
29
+
30
+ @property
31
+ def exception(self) -> Exception | None:
32
+ return self._exception
33
34
@property
35
def task_group(self) -> TaskGroup:
@@ -45,8 +50,8 @@ def run(self) -> None:
45
50
"""Run the thread."""
46
51
try:
47
52
run(self._main)
48
- except Exception:
49
- pass
53
+ except Exception as exc:
54
+ self._exception = exc
55
56
async def _main(self) -> None:
57
async with create_task_group() as tg:
0 commit comments