X-Git-Url: http://www.average.org/gitweb/?p=WhereAmI.git;a=blobdiff_plain;f=src%2Forg%2Faverage%2Fwhereami%2FPhoneLog.java;fp=src%2Forg%2Faverage%2Fwhereami%2FPhoneLog.java;h=7ce53eaa06920e39f08566f7699aca4f07047400;hp=cf904c67a5038e5e515a2fbdf23bdb515bc07538;hb=f865ec027b40d832f5c78eceb32f268dca3dda52;hpb=78984664428e06a24ab837a005a9a6e5699960e6 diff --git a/src/org/average/whereami/PhoneLog.java b/src/org/average/whereami/PhoneLog.java index cf904c6..7ce53ea 100644 --- a/src/org/average/whereami/PhoneLog.java +++ b/src/org/average/whereami/PhoneLog.java @@ -7,6 +7,8 @@ import org.average.whereami.PersistentStore; import org.average.whereami.SayWhen; import java.io.IOException; +import java.net.UnknownHostException; +import org.apache.http.conn.HttpHostConnectException; import com.google.api.client.googleapis.json.GoogleJsonResponseException; import com.google.api.client.http.HttpResponseException; @@ -96,6 +98,16 @@ public final class PhoneLog extends Oracle { } catch (HttpResponseException e) { Log.e(TAG, "HttpResponseException: " + e); return new Utterance(false, e.getMessage()); + } catch (UnknownHostException e) { + Log.e(TAG, "UnknownHostException: " + e); + return new Utterance(false, + base.connectErrorMessage + "\n" + + e.getMessage()); + } catch (HttpHostConnectException e) { + Log.e(TAG, "HttpHostConnectException: " + e); + return new Utterance(false, + base.connectErrorMessage + "\n" + + e.getMessage()); } catch (IOException e) { Log.e(TAG, "IOException: " + e); return new Utterance(false, e.getMessage());