[LogCat] Changed tag and added log message for invalid-formatted URL situation.
This commit is contained in:
parent
67b5210191
commit
6574df3d2f
@ -118,18 +118,19 @@ public class MainActivity extends AppCompatActivity
|
|||||||
switch (errorCode) {
|
switch (errorCode) {
|
||||||
case 1: {
|
case 1: {
|
||||||
Toast.makeText(MainActivity.this, "Ошибка сети. Проверьте подключение к сети или данные подключения к API!", Toast.LENGTH_LONG).show();
|
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);
|
mSwipeRefreshLayout.setRefreshing(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
Toast.makeText(MainActivity.this, "Ответ от сервера неверен! Перепроверьте данные подключения!", Toast.LENGTH_LONG).show();
|
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);
|
mSwipeRefreshLayout.setRefreshing(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3: {
|
case 3: {
|
||||||
Toast.makeText(this, "Вы ввели неверный URL. Пример: http://example.ru", Toast.LENGTH_LONG).show();
|
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);
|
mSwipeRefreshLayout.setRefreshing(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user