Skip to content

Commit

Permalink
Revert "Merge pull request jenkinsci#193 from witokondoria/fix/Differ…
Browse files Browse the repository at this point in the history
…entErrorCodesHandling"

This reverts commit 21e59c5, reversing
changes made to ab254bb.
  • Loading branch information
jeffret-b committed Jun 11, 2019
1 parent 1fecf96 commit 4a33d1e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/main/java/hudson/remoting/Launcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.io.Console;
import java.io.FileInputStream;
import java.io.UnsupportedEncodingException;
import java.io.FileNotFoundException;
import java.nio.file.Path;
import java.security.KeyStore;
import java.security.KeyStoreException;
Expand Down Expand Up @@ -495,12 +494,9 @@ public List<String> parseJnlpArguments() throws ParserConfigurationException, SA

if (con instanceof HttpURLConnection) {
HttpURLConnection http = (HttpURLConnection) con;
if(http.getResponseCode()>=500)
// got the error code. report that (such as 401)
throw new IOException("Failed to load "+slaveJnlpURL+": "+http.getResponseCode()+" "+http.getResponseMessage());
if(http.getResponseCode()>=400)
// got the error code. report that (such as 401)
throw new FileNotFoundException("Failed to load "+slaveJnlpURL+": "+http.getResponseCode()+" "+http.getResponseMessage());
throw new IOException("Failed to load "+slaveJnlpURL+": "+http.getResponseCode()+" "+http.getResponseMessage());
}

Document dom;
Expand Down Expand Up @@ -557,11 +553,6 @@ public List<String> parseJnlpArguments() throws ParserConfigurationException, SA
throw x;
} else
throw e;
} catch (FileNotFoundException e) {
System.err.println("Failing to obtain "+slaveJnlpURL);
e.printStackTrace(System.err);
System.err.println("Will silently exit without errors");
System.exit(0);
} catch (IOException e) {
if (this.noReconnect)
throw (IOException)new IOException("Failing to obtain "+slaveJnlpURL).initCause(e);
Expand Down

0 comments on commit 4a33d1e

Please sign in to comment.