mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-37212 Show traceback when terminating on uncaught exception
GitOrigin-RevId: 0c2772e0449a5ff5be06d1b0398e70abeae56dfd
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b5e998646f
commit
bfe9d87d54
@@ -1189,6 +1189,13 @@ class PyDB(object):
|
||||
pydev_log.debug("We are stopping in post-mortem\n")
|
||||
thread_id = get_thread_id(thread)
|
||||
pydevd_vars.add_additional_frame_by_id(thread_id, frames_byid)
|
||||
exctype, value, tb = arg
|
||||
while tb:
|
||||
if self.is_top_level_trace_in_project_scope(tb):
|
||||
break
|
||||
tb = tb.tb_next
|
||||
sys.__excepthook__(exctype, value, tb)
|
||||
sys.excepthook = lambda type, value, traceback: None # Avoid printing the exception for the second time.
|
||||
try:
|
||||
try:
|
||||
add_exception_to_frame(frame, arg)
|
||||
|
||||
@@ -456,6 +456,10 @@ public class PythonDebuggerTest extends PyEnvTestCase {
|
||||
public void testing() throws Exception {
|
||||
waitForPause();
|
||||
waitForOutput("message=\"python-exceptions.ZeroDivisionError\"", "message=\"python-builtins.ZeroDivisionError\"");
|
||||
waitForOutput("Traceback (most recent call last):");
|
||||
waitForOutput("line 7, in foo");
|
||||
waitForOutput("return 1 / x");
|
||||
waitForOutput("ZeroDivisionError: ");
|
||||
eval("__exception__[0].__name__").hasValue("'ZeroDivisionError'");
|
||||
resume();
|
||||
waitForTerminate();
|
||||
|
||||
Reference in New Issue
Block a user