From 78247ff85e64bb4744b8ed8e9b6d02dc3dbd53a2 Mon Sep 17 00:00:00 2001 From: Xavier Ducrohet Date: Mon, 17 Aug 2009 18:04:01 -0700 Subject: [PATCH] Make SSL error a bit more human readable. --- .../src/com/android/sdklib/internal/repository/RepoSource.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/RepoSource.java b/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/RepoSource.java index 1d76655bd..d86859dce 100755 --- a/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/RepoSource.java +++ b/tools/sdkmanager/libs/sdklib/src/com/android/sdklib/internal/repository/RepoSource.java @@ -31,6 +31,7 @@ import java.net.URL; import java.util.ArrayList; import java.util.HashMap; +import javax.net.ssl.SSLKeyException; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -191,6 +192,8 @@ public class RepoSource implements IDescription { if (exception[0] != null) { if (exception[0] instanceof FileNotFoundException) { 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) { reason = exception[0].getMessage(); }