Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c1afbac

Browse files
committed
Check for exceptions
1 parent cd9a690 commit c1afbac

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,12 @@ def _allow_interrupt(prepare_notifier, handle_sigint):
16721672
def save_args_and_handle_sigint(*args):
16731673
nonlocal handler_args
16741674
handler_args = args
1675-
handle_sigint()
1675+
try:
1676+
handle_sigint()
1677+
except Exception as e:
1678+
import traceback
1679+
traceback.print_exception(e)
1680+
raise
16761681

16771682
signal.signal(signal.SIGINT, save_args_and_handle_sigint)
16781683
try:

0 commit comments

Comments
 (0)