Fixed tag of log, added log message for network error.

This commit is contained in:
ChronosX88 2018-11-20 15:38:10 +03:00
parent 0279a95ab3
commit f595212692

View File

@ -175,12 +175,12 @@ public class MainActivity extends AppCompatActivity
firstLevelObjects.addAll(response.body());
} catch(Exception e) {
Toast.makeText(MainActivity.this, "Ответ от сервера неверен! Перепроверьте данные подключения!", Toast.LENGTH_LONG).show();
Log.e("ERROR", "Answer of server is wrong! Re-check your connection credentials! Error: " + response.message());
Log.e("VRCatalog", "Answer of server is wrong! Re-check your connection credentials! Error: " + response.message());
mSwipeRefreshLayout.setRefreshing(false);
}
fillRootNode();
} else {
Log.e("ERROR", "Что-то пошло не так...");
Log.e("VRCatalog", "Что-то пошло не так...");
mSwipeRefreshLayout.setRefreshing(false);
}
@ -189,7 +189,7 @@ public class MainActivity extends AppCompatActivity
@Override
public void onFailure(Call<List<FirstLevelModel>> call, Throwable t) {
Toast.makeText(MainActivity.this, "Ошибка сети. Проверьте подключение к сети или данные подключения к API!", Toast.LENGTH_LONG).show();
Log.e("ERROR", "getFirstLevel() failed!");
Log.e("VRCatalog", "Network Error! Re-check your connection credentials or network settings!");
mSwipeRefreshLayout.setRefreshing(false);
}
});