From 5ee4458e0427cf35d2eb202c786e612b1237bccd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 29 Nov 2016 09:46:43 +0530 Subject: [PATCH] Do not exit event loop if an unhandled exception occurs in a callback --- kitty/tabs.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kitty/tabs.py b/kitty/tabs.py index 226e9bbc8..8c9c81dea 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -176,7 +176,11 @@ class TabManager(Thread): func, args = self.action_queue.get_nowait() except Empty: break - func(*args) + try: + func(*args) + except Exception: + import traceback + traceback.print_exc() def add_child_fd(self, child_fd, read_ready, write_ready): self.read_dispatch_map[child_fd] = read_ready