Bug 517602: "py4j.Py4JException: An exception was raised by the Python Proxy" when terminating Py4J debug session

When terminating, #handleEvent sets resume type to STEP_END,
which causes #traceDispatch to raise an ExitException. The
ExitException is propagated back to python, and eventually
ends up back here at Exit method. However Py4J does not support
propogating the same type of exception
across the Python/Java barrier, so what ends up being thrown
is a Py4JException instead.

Therefore we catch that case and re-raise the expected ExitException()

Change-Id: I5db19996e7373aa913032cd722785a8e151b362d
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
1 file changed