NearestFavoriteStationWidgetService: Show root cause of exception.

This commit is contained in:
Andreas Schildbach 2019-01-21 15:53:19 +01:00
parent 3c1b635cc4
commit 1f66669608

View file

@ -301,7 +301,8 @@ public class NearestFavoriteStationWidgetService extends JobIntentService {
log.info("Could not query departures for station " + stationId, x);
} catch (final Exception x) {
setHeader(appWidgetId, favorite.name);
setMessage(getString(R.string.nearest_favorite_station_widget_error_exception, x.toString()));
setMessage(getString(R.string.nearest_favorite_station_widget_error_exception,
Throwables.getRootCause(x).toString()));
appWidgetManager.updateAppWidget(appWidgetId, views);
log.info("Could not query departures for station " + stationId, x);
}