Fix error message for jumping to another frame (PY-9537)

This commit is contained in:
Elizaveta Shashkova
2017-09-25 21:03:46 +03:00
parent f4a2dec7fe
commit c12bd3b5c7
3 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -811,6 +811,8 @@ class PyDB:
frame.f_lineno = line
frame.f_trace = None
stop = True
else:
response_msg = "jump is available only within the bottom frame"
except ValueError as e:
response_msg = "%s" % e
info.pydev_state = STATE_SUSPEND
@@ -823,9 +825,9 @@ class PyDB:
cmd = self.cmd_factory.make_thread_run_message(get_thread_id(thread), info.pydev_step_cmd)
self.writer.add_command(cmd)
info.pydev_step_cmd = None
info.pydev_state = STATE_SUSPEND
if stop:
info.pydev_state = STATE_SUSPEND
thread.stop_reason = CMD_THREAD_SUSPEND
# return to the suspend state and wait for other command
@@ -336,7 +336,7 @@ public class RemoteDebugger implements ProcessDebugger {
try {
command.execute();
}
catch (PyDebuggerException e) {
catch (Exception e) {
LOG.error(e);
}
finally {
@@ -53,6 +53,7 @@ public class SetNextStatementCommand extends AbstractThreadCommand {
@Override
protected void buildPayload(Payload payload) {
super.buildPayload(payload);
payload.add(myLine + 1).add(myFunctionName);
String functionName = myFunctionName != null ? myFunctionName : "None";
payload.add(myLine + 1).add(functionName);
}
}