@Override public void onRequestFailure(SpiceException exception) { Log.v(TAG, exception.getMessage()); if (exception.getCause() instanceof HttpClientErrorException) { HttpClientErrorException e = (HttpClientErrorException) exception.getCause(); if (e.getStatusCode().equals(HttpStatus.UNAUTHORIZED)) { dh.clearPesistentUser(); Intent intent = new Intent(FriendsList.this, LoginActivity.class); FriendsList.this.startActivity(intent); finish(); } } }
@Override public void onRequestFailure(SpiceException exception) { Log.e(TAG, "failure" + exception.getMessage()); Toast.makeText(getApplicationContext(), "Failed to confirm friend", Toast.LENGTH_LONG).show(); if (exception.getCause() instanceof HttpClientErrorException) { HttpClientErrorException e = (HttpClientErrorException) exception.getCause(); if (e.getStatusCode().equals(HttpStatus.UNAUTHORIZED)) { dh.clearPesistentUser(); Intent intent = new Intent(FriendsList.this, LoginActivity.class); FriendsList.this.startActivity(intent); finish(); } } }
@Override public void onRequestFailure(SpiceException e) { Toast.makeText(getActivity(), "Error during request: " + e.getMessage(), Toast.LENGTH_LONG) .show(); progressBar.setVisibility(View.GONE); }
@Override public void onRequestFailure(SpiceException spiceException) { setRefreshing(false); reportError( spiceException.getLocalizedMessage(), getString(R.string.repeat), new View.OnClickListener() { @Override public void onClick(View v) { loadFeed(); } }); }
public void onRequestFailure(SpiceException spiceexception) { Throwable throwable = spiceexception.getCause(); if (throwable instanceof RetrofitError) { RetrofitError retrofitError = (RetrofitError) throwable; if (retrofitError.isNetworkError()) { onNetworkError(); return; } if (retrofitError.getResponse() == null) { onUnknownError(throwable); return; } int i = retrofitError.getResponse().getStatus(); switch (i) { default: if (i >= 500) { onServerError(); return; } break; case 403: onForbiddenError(); return; case 404: onNotFoundError(); return; case 409: onConflictError(); return; case 400: onBadRequestError(); return; } } if (spiceexception instanceof RequestCancelledException) { Log.d("APIRequestListener", "Request cancelled."); return; } else { onUnknownError(throwable); return; } }
@Override public void onRequestFailure(SpiceException se) { // TODO Auto-generated method stub Log.d("tete", "ERROR : " + AccountFragment.class.getCanonicalName() + " " + se.getMessage()); }
@Override public void onRequestFailure(SpiceException spiceException) { Toast.makeText( NewProductActivity.this, "Error: " + spiceException.getMessage(), Toast.LENGTH_SHORT) .show(); }