void (int exitCode) { if (exitCode != 0) { Charset cs = getCharset(); String message = new String(myStderr.toByteArray(), cs); if (message.isEmpty()) { if (myException.get() != null) { message = IdeCoreBundle.message("finished.with.exit.code.text.message", exitCode); } else { message = null; } } else { if (vcsConsoleWriter != null && !isStderrSuppressed()) { vcsConsoleWriter.showErrorMessage(message); } } if (message != null) { VcsException e = myException.getAndSet(new VcsException(message)); if (e != null) { LOG.warn("Dropping previous exception: ", e); } } } }