am 9a7b2700: Merge change 21645 into donut

Merge commit '9a7b2700fd015252f59a25524f8f6231f9bb1fc4' into eclair

* commit '9a7b2700fd015252f59a25524f8f6231f9bb1fc4':
  Make SSL error a bit more human readable.
This commit is contained in:
Xavier Ducrohet
2009-08-18 13:11:18 -07:00
committed by Android Git Automerger

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