Renamed PyExecutionException.getReturnCode() to getExitCode() for consistency with ProcessOutput

This commit is contained in:
Andrey Vlasovskikh
2014-09-29 16:53:55 +04:00
parent 72dbf4f682
commit 0cb60b64b8
2 changed files with 8 additions and 8 deletions
@@ -32,20 +32,20 @@ public class PyExecutionException extends ExecutionException {
@NotNull private String myCommand;
@NotNull private List<String> myArgs;
private final int myReturnCode;
private final int myExitCode;
@NotNull private String myMessage;
@NotNull private final List<? extends PyExecutionFix> myFixes;
public PyExecutionException(@NotNull String message, @NotNull String command, @NotNull List<String> args, int returnCode) {
this(message, command, args, returnCode, Collections.<PyExecutionFix>emptyList());
public PyExecutionException(@NotNull String message, @NotNull String command, @NotNull List<String> args, int exitCode) {
this(message, command, args, exitCode, Collections.<PyExecutionFix>emptyList());
}
public PyExecutionException(@NotNull String message, @NotNull String command, @NotNull List<String> args,
int returnCode, @NotNull List<? extends PyExecutionFix> fixes) {
int exitCode, @NotNull List<? extends PyExecutionFix> fixes) {
super(message);
myCommand = command;
myArgs = args;
myReturnCode = returnCode;
myExitCode = exitCode;
myMessage = stripLinesWithoutLineFeeds(message);
myFixes = fixes;
}
@@ -94,7 +94,7 @@ public class PyExecutionException extends ExecutionException {
return myFixes;
}
public int getReturnCode() {
return myReturnCode;
public int getExitCode() {
return myExitCode;
}
}
@@ -133,7 +133,7 @@ public class PyPackageManagerImpl extends PyPackageManager {
return hasPackage(SETUPTOOLS, cachedOnly) || hasPackage(DISTRIBUTE, cachedOnly);
}
catch (PyExecutionException e) {
if (e.getReturnCode() == ERROR_NO_SETUPTOOLS) {
if (e.getExitCode() == ERROR_NO_SETUPTOOLS) {
return false;
}
throw e;