Merge change 21645 into donut

* changes:
  Make SSL error a bit more human readable.
This commit is contained in:
Android (Google) Code Review
2009-08-18 10:30:43 -07:00

View File

@@ -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();
}