From 3e7171c8ef2eeaf92b28ecda5e84d545f40db568 Mon Sep 17 00:00:00 2001 From: Axel Svensson Date: Tue, 12 Oct 2021 17:33:46 +0200 Subject: [PATCH] Error handling for GUI callbacks --- pdf-sign | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pdf-sign b/pdf-sign index abc8674..a3e59d1 100755 --- a/pdf-sign +++ b/pdf-sign @@ -132,6 +132,8 @@ def main(args): nonlocal doSign doSign=True root.destroy() + # Error handling + tk.Tk.report_callback_exception = lambda self, exc, val, tb: die(val) # Window and menu root = tk.Tk() rootmenu = tk.Menu(root)