Add more extensive error logging
This commit is contained in:
parent
340e41bc01
commit
eff4802c9d
@ -3,6 +3,7 @@ package com.uam.wmi.findmytutor.activity;
|
|||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.animation.TypeEvaluator;
|
import android.animation.TypeEvaluator;
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
@ -12,6 +13,7 @@ import android.support.design.widget.FloatingActionButton;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
|
||||||
|
import com.jakewharton.retrofit2.adapter.rxjava2.HttpException;
|
||||||
import com.mapbox.mapboxsdk.style.layers.CircleLayer;
|
import com.mapbox.mapboxsdk.style.layers.CircleLayer;
|
||||||
import com.mapbox.mapboxsdk.style.layers.Layer;
|
import com.mapbox.mapboxsdk.style.layers.Layer;
|
||||||
import com.mapbox.mapboxsdk.style.layers.SymbolLayer;
|
import com.mapbox.mapboxsdk.style.layers.SymbolLayer;
|
||||||
@ -41,6 +43,7 @@ import com.uam.wmi.findmytutor.model.Coordinate;
|
|||||||
import com.uam.wmi.findmytutor.network.RetrofitClientInstance;
|
import com.uam.wmi.findmytutor.network.RetrofitClientInstance;
|
||||||
import com.uam.wmi.findmytutor.service.CoordinateService;
|
import com.uam.wmi.findmytutor.service.CoordinateService;
|
||||||
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
import com.uam.wmi.findmytutor.utils.PrefUtils;
|
||||||
|
import com.uam.wmi.findmytutor.utils.RestApiHelper;
|
||||||
import com.uam.wmi.findmytutor.utils.mapUtils;
|
import com.uam.wmi.findmytutor.utils.mapUtils;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
@ -53,6 +56,7 @@ import io.reactivex.annotations.NonNull;
|
|||||||
import io.reactivex.disposables.CompositeDisposable;
|
import io.reactivex.disposables.CompositeDisposable;
|
||||||
import io.reactivex.observers.DisposableSingleObserver;
|
import io.reactivex.observers.DisposableSingleObserver;
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
import okhttp3.ResponseBody;
|
||||||
|
|
||||||
|
|
||||||
public class MapActivity extends BaseActivity
|
public class MapActivity extends BaseActivity
|
||||||
@ -233,10 +237,17 @@ public class MapActivity extends BaseActivity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@SuppressLint("LongLogTag")
|
||||||
@Override
|
@Override
|
||||||
public void onError(Throwable e) {
|
public void onError(Throwable e) {
|
||||||
Log.e("Error", e.toString());
|
|
||||||
|
Log.e("MapActivity onError", e.getMessage());
|
||||||
|
|
||||||
|
if (e instanceof HttpException) {
|
||||||
|
ResponseBody responseBody = ((HttpException) e).response().errorBody();
|
||||||
|
Log.e("MapActivity onError", RestApiHelper.getErrorMessage(responseBody));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user