1
0

[API] Add error messages to exceptions (#71)

This commit is contained in:
Mikołaj Pich
2018-03-20 23:10:20 +01:00
committed by Rafał Borcz
parent 63b4ed42ca
commit 3dabb11473
15 changed files with 53 additions and 24 deletions

View File

@ -12,7 +12,6 @@ import javax.inject.Singleton;
import io.github.wulkanowy.R;
import io.github.wulkanowy.api.NotLoggedInErrorException;
import io.github.wulkanowy.api.VulcanOfflineException;
import io.github.wulkanowy.data.db.dao.entities.AttendanceLesson;
import io.github.wulkanowy.di.annotations.ApplicationContext;
import io.github.wulkanowy.utils.AppConstant;
@ -51,8 +50,6 @@ public class AppResources implements ResourcesContract {
return resources.getString(R.string.generic_timeout_error);
} else if (exception instanceof NotLoggedInErrorException || exception instanceof IOException) {
return resources.getString(R.string.login_denied_text);
} else if (exception instanceof VulcanOfflineException) {
return resources.getString(R.string.error_host_offline);
} else {
return exception.getMessage();
}

View File

@ -39,7 +39,6 @@
<string name="fragment_no_grades">Brak ocen</string>
<string name="noInternet_text">Brak połączenia z internetem</string>
<string name="error_host_offline">Przerwa techniczna. Spróbuj ponownie później</string>
<string name="encrypt_failed_text">Szyfrowanie nie powiodło się. Automatyczne logowanie zostało wyłączone</string>
<string name="version_text">Wersja %1$s</string>
<string name="refresh_error_text">"Podczas odświeżania zawartości wystąpił błąd. "</string>

View File

@ -73,7 +73,6 @@
<string name="info_average_grades">Average: %1$.2f</string>
<string name="info_no_average">No average</string>
<string name="info_free_week">No lesson in this week</string>
<string name="error_host_offline">Technical break</string>
<string name="timetable_subitem_room">Room %s</string>