From 8947d7e6cba6991ef4e1c1139365efd150fd4136 Mon Sep 17 00:00:00 2001 From: Julien Guerinet Date: Mon, 11 Jan 2016 21:46:45 -0500 Subject: [PATCH] Catching the socket timeout separately to avoid reporting it to Crashlytics. --- .../mcgillmobile/util/thread/ConfigDownloader.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/ca/appvelopers/mcgillmobile/util/thread/ConfigDownloader.java b/app/src/main/java/ca/appvelopers/mcgillmobile/util/thread/ConfigDownloader.java index dc012ddd6..457d09ab4 100644 --- a/app/src/main/java/ca/appvelopers/mcgillmobile/util/thread/ConfigDownloader.java +++ b/app/src/main/java/ca/appvelopers/mcgillmobile/util/thread/ConfigDownloader.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 Appvelopers + * Copyright 2014-2016 Appvelopers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ import java.io.IOException; import java.lang.reflect.Type; import java.net.Proxy; +import java.net.SocketTimeoutException; import java.util.ArrayList; import java.util.List; @@ -169,8 +170,9 @@ public Request authenticateProxy(Proxy proxy, Response response) } } } - } - catch (Exception e) { + } catch (SocketTimeoutException e) { + Timber.i("Error: Socket timeout"); + } catch (Exception e) { //Catch any possible exceptions Timber.e(e, "Section Error: %s", mCurrentSection); }