Make SSL error a bit more human readable.

This commit is contained in:
Xavier Ducrohet
2009-08-17 18:04:01 -07:00
parent 513c2b5116
commit 78247ff85e

View File

@@ -31,6 +31,7 @@ import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import javax.net.ssl.SSLKeyException;
import javax.xml.XMLConstants; import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
@@ -191,6 +192,8 @@ public class RepoSource implements IDescription {
if (exception[0] != null) { if (exception[0] != null) {
if (exception[0] instanceof FileNotFoundException) { if (exception[0] instanceof FileNotFoundException) {
reason = "File not found"; reason = "File not found";
} else if (exception[0] instanceof SSLKeyException) {
reason = "SSL error. You might want to force download through http in the settings.";
} else if (exception[0].getMessage() != null) { } else if (exception[0].getMessage() != null) {
reason = exception[0].getMessage(); reason = exception[0].getMessage();
} }