void (@NotNull ProgressIndicator indicator) { try { if (indicator.isCanceled()) return; Pair<String, Boolean> executed = exec(command); nextResponse = new InterpreterResponse(executed.second, false); } catch (ProcessCanceledException e) { //ignore } catch (PythonUnhandledException e) { LOG.error("Error in execInterpreter():" + e.traceback); nextResponse = new InterpreterResponse(false, false); notifyCommandExecuted(true); } catch (Exception e) { nextResponse = new InterpreterResponse(false, false); notifyCommandExecuted(true); } finally { InterpreterResponse response = nextResponse; if (response != null && response.more) { myNeedsMore = true; } onResponseReceived.fun(response); } }