[LogCat] Changed tag and added log message for invalid-formatted URL situation.

This commit is contained in:
Denis Davydov 2019-01-22 16:47:08 +03:00
parent 67b5210191
commit 6574df3d2f

View File

@ -118,18 +118,19 @@ public class MainActivity extends AppCompatActivity
switch (errorCode) {
case 1: {
Toast.makeText(MainActivity.this, "Ошибка сети. Проверьте подключение к сети или данные подключения к API!", Toast.LENGTH_LONG).show();
Log.e("VRCatalog", "Network Error! Re-check your connection credentials or network settings! Technical info: null");
Log.e("MainActivity", "Network Error! Re-check your connection credentials or network settings!");
mSwipeRefreshLayout.setRefreshing(false);
break;
}
case 2: {
Toast.makeText(MainActivity.this, "Ответ от сервера неверен! Перепроверьте данные подключения!", Toast.LENGTH_LONG).show();
Log.e("VRCatalog", "Answer of server is wrong! Re-check your connection credentials! Technical info: null");
Log.e("MainActivity", "Answer of server is wrong! Re-check your connection credentials!");
mSwipeRefreshLayout.setRefreshing(false);
break;
}
case 3: {
Toast.makeText(this, "Вы ввели неверный URL. Пример: http://example.ru", Toast.LENGTH_LONG).show();
Log.e("MainActivity", "Invalid-formatted URL. Please, check URL (change his if it need) and try again.");
mSwipeRefreshLayout.setRefreshing(false);
break;
}