mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 12:53:08 +00:00
add some Error handling
This commit is contained in:
parent
8eca371414
commit
8adc1ad0d6
6 changed files with 20 additions and 8 deletions
|
@ -60,7 +60,8 @@ public class ConferencesBrowseFragment extends BrowseFragment {
|
|||
|
||||
@Override
|
||||
public void onFailure(Call<Conferences> call, Throwable t) {
|
||||
|
||||
Log.d(TAG,"Error loading conferences",t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.os.Handler;
|
|||
import android.support.v17.leanback.app.VerticalGridFragment;
|
||||
import android.support.v17.leanback.widget.ArrayObjectAdapter;
|
||||
import android.support.v17.leanback.widget.VerticalGridPresenter;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
@ -24,6 +25,7 @@ import retrofit2.Response;
|
|||
public class ConferencesGridFragment extends VerticalGridFragment {
|
||||
|
||||
private static final int NUM_COLUMNS = 5;
|
||||
private static final String TAG = ConferencesGridFragment.class.getSimpleName();
|
||||
private final ArrayObjectAdapter mConferenceAdapter =
|
||||
new ArrayObjectAdapter(new CardPresenter());
|
||||
private MediaCCCClient mMediaCCCClient;
|
||||
|
@ -46,6 +48,8 @@ public class ConferencesGridFragment extends VerticalGridFragment {
|
|||
|
||||
@Override
|
||||
public void onFailure(Call<Conferences> call, Throwable t) {
|
||||
Log.d(TAG,"Error loading conferences",t);
|
||||
t.printStackTrace();
|
||||
|
||||
}
|
||||
});
|
||||
|
|
|
@ -99,7 +99,8 @@ public class EventsBrowseFragment extends BrowseFragment {
|
|||
|
||||
@Override
|
||||
public void onFailure(Call<Conference> call, Throwable t) {
|
||||
// TODO handle failure
|
||||
Log.d(TAG,"Error loading conferences",t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
prepareBackgroundManager();
|
||||
|
|
|
@ -51,7 +51,8 @@ public class EventsDetailsFragment extends DetailsFragment {
|
|||
|
||||
@Override
|
||||
public void onFailure(Call<Event> call, Throwable t) {
|
||||
|
||||
Log.d(TAG,"Error loading conferences",t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -100,7 +101,8 @@ public class EventsDetailsFragment extends DetailsFragment {
|
|||
|
||||
@Override
|
||||
public void onFailure(Call<Conference> call, Throwable t) {
|
||||
|
||||
Log.d(TAG,"Error loading conferences",t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ import android.support.v17.leanback.widget.PlaybackControlsRow.SkipPreviousActio
|
|||
import android.support.v17.leanback.widget.PlaybackControlsRow.ThumbsDownAction;
|
||||
import android.support.v17.leanback.widget.PlaybackControlsRow.ThumbsUpAction;
|
||||
import android.support.v17.leanback.widget.PlaybackControlsRowPresenter;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
|
@ -113,7 +114,8 @@ public class PlaybackOverlayFragment extends PlaybackFragment {
|
|||
|
||||
@Override
|
||||
public void onFailure(Call<Event> call, Throwable t) {
|
||||
|
||||
Log.d(TAG,"Error loading conferences",t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
mHandler = new Handler();
|
||||
|
|
|
@ -121,7 +121,8 @@ public class VideoDetailsFragment extends DetailsFragment {
|
|||
|
||||
@Override
|
||||
public void onFailure(Call<Event> call, Throwable t) {
|
||||
|
||||
Log.d(TAG,"Error loading conferences",t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
setupRelatedEvents();
|
||||
|
@ -251,7 +252,8 @@ public class VideoDetailsFragment extends DetailsFragment {
|
|||
|
||||
@Override
|
||||
public void onFailure(Call<Conference> call, Throwable t) {
|
||||
|
||||
Log.d(TAG,"Error loading conferences",t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue