From b9f4f8bc321465fb058f4f4d9068ac455490769a Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Wed, 12 Oct 2016 12:16:44 -0500 Subject: [PATCH] Print stacktrace when interrupted before collecting result --- gen_wrap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gen_wrap.py b/gen_wrap.py index d057d30..9e949cc 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -1520,8 +1520,11 @@ def write_method_wrapper(gen, cls_name, meth): # This should never happen. sys.stderr.write("*** islpy was interrupted while collecting " "a result. " - "System state is inconsistent as a result, aborting.\n") + "System state is inconsistent as a result, will print " + "traceback and abort.\n") sys.stderr.flush() + import traceback + traceback.print_stack() import os os._exit(-1) """) -- GitLab